creator-simctl

Crates.iocreator-simctl
lib.rscreator-simctl
version0.1.1
sourcesrc
created_at2021-01-05 23:21:04.710041
updated_at2021-01-05 23:21:04.710041
descriptionRust wrapper around Xcode's `simctl`.
homepage
repositoryhttps://github.com/polyhorn/simctl
max_upload_size
id332509
size64,705
David (enfipy)

documentation

README

Simctl

Built Status crates.io Docs.rs

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.


Example

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()?;

Operations

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.

Supported Operations

  • boot
  • get_app_container
  • getenv
  • install
  • io screenshot
  • keychain reset
  • launch
  • list
  • openurl
  • privacy
  • push
  • shutdown
  • status_bar
  • terminate
  • ui
  • uninstall

Unsupported Operations

  • addmedia
  • clone
  • create
  • delete
  • diagnose
  • erase
  • icloud_sync
  • install_app_data
  • io enumerate
  • io poll
  • io recordVideo
  • keychain add-cert
  • keychain add-root-cert
  • logverbose
  • pair
  • pair_activate
  • pbcopy
  • pbpaste
  • pbsync
  • rename
  • spawn
  • unpair
  • upgrade
Commit count: 12

cargo fmt