| Crates.io | creator-simctl |
| lib.rs | creator-simctl |
| version | 0.1.1 |
| created_at | 2021-01-05 23:21:04.710041+00 |
| updated_at | 2021-01-05 23:21:04.710041+00 |
| description | Rust wrapper around Xcode's `simctl`. |
| homepage | |
| repository | https://github.com/polyhorn/simctl |
| max_upload_size | |
| id | 332509 |
| size | 64,705 |
This crate provides a safe wrapper around the simctl utility that ships with
Xcode.
🚨 Important: this library only works if Xcode is installed and currently only works with Xcode 12.
use simctl::{Simctl, DeviceQuery};
let simctl = Simctl::new();
let device = simctl.list()?.devices().iter()
.available()
.by_name("iPhone SE (2nd generation)")
.next().unwrap();
let _ = device.boot();
device.launch("com.apple.mobilesafari").exec()?;
let image = device.io().screenshot(
simctl::io::ImageType::Png,
simctl::io::Display::Internal,
simctl::io::Mask::Ignored,
)?;
device.shutdown()?;
The following operations are currently supported by this crate. For a full list
of operations that are available in the original CLI, run xcrun simctl.