| Crates.io | simctl |
| lib.rs | simctl |
| version | 0.1.1 |
| created_at | 2020-10-26 15:32:46.788946+00 |
| updated_at | 2020-11-16 22:09:02.368224+00 |
| description | Rust wrapper around Xcode's `simctl`. |
| homepage | |
| repository | https://github.com/polyhorn/simctl |
| max_upload_size | |
| id | 305661 |
| size | 64,669 |
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.