Skip to content

Instantly share code, notes, and snippets.

@ldakhoa
Last active August 21, 2023 16:52
Show Gist options
  • Save ldakhoa/df5e9cc5b9c5a9081e47aae5703891c0 to your computer and use it in GitHub Desktop.
Save ldakhoa/df5e9cc5b9c5a9081e47aae5703891c0 to your computer and use it in GitHub Desktop.
Simulator Command Line
Subcommands:
addmedia Add photos, live photos, videos, or contacts to the library of a device.
boot Boot a device or device pair.
clone Clone an existing device.
create Create a new device.
delete Delete specified devices, unavailable devices, or all devices.
diagnose Collect diagnostic information and logs.
erase Erase a device's contents and settings.
get_app_container Print the path of the installed app's container
getenv Print an environment variable from a running device.
help Prints the usage for a given subcommand.
icloud_sync Trigger iCloud sync on a device.
install Install an app on a device.
install_app_data Install an xcappdata package to a device, replacing the current contents of the container.
io Set up a device IO operation.
keychain Manipulate a device's keychain
launch Launch an application by identifier on a device.
list List available devices, device types, runtimes, or device pairs.
location Control a device's simulated location
logverbose enable or disable verbose logging for a device
openurl Open a URL in a device.
pair Create a new watch and phone pair.
pair_activate Set a given pair as active.
pbcopy Copy standard input onto the device pasteboard.
pbpaste Print the contents of the device's pasteboard to standard output.
pbsync Sync the pasteboard content from one pasteboard to another.
privacy Grant, revoke, or reset privacy and permissions
push Send a simulated push notification
rename Rename a device.
runtime Perform operations on runtimes
shutdown Shutdown a device.
spawn Spawn a process by executing a given executable on a device.
status_bar Set or clear status bar overrides
terminate Terminate an application by identifier on a device.
ui Get or Set UI options
uninstall Uninstall an app from a device.
unpair Unpair a watch and phone pair.
upgrade Upgrade a device to a newer runtime.

See all simulator information xcrun simctl list

== Device Types ==
iPhone 6s (com.apple.CoreSimulator.SimDeviceType.iPhone-6s)
iPhone 6s Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-6s-Plus)
== Runtimes ==
Apple TV 4K (at 1080p) (com.apple.CoreSimulator.SimDeviceType.Apple-TV-4K-1080p)
iOS 17.0 (17.0 - 21A5248u) - com.apple.CoreSimulator.SimRuntime.iOS-17-0
watchOS 10.0 (10.0 - 21R5275s) - com.apple.CoreSimulator.SimRuntime.watchOS-10-0
== Devices ==
-- iOS 16.4 --
    iPhone SE (3rd generation) (BCA43A4F-82BA-4CA6-A524-70365AAD4DA6) (Shutdown)
    iPhone 14 (7D000054-7975-4840-A4CB-B2CD089642FC) (Shutdown)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment