help
1
xcrun simctl
get a list of simulators
1
2
3
4
5
6
7
8
9
#help
xcrun simctl help list
#usage
simctl list [-j | --json] [-e | --no-escape-slashes] [-v] [devices|devicetypes|runtimes|pairs] [<search term>|available]
#example
xcrun simctl list -j -v devices > $HOME/Desktop/sims.json
xcrun simctl list -j devices "iPhone" > $HOME/Desktop/sims.json
open simulator
1
open -a Simulator
open specific simulator
1
2
3
4
5
6
1. open terminal
2. xcrun simctl list
3. get udid of the device you want to launch
4. Paste this in the terminal
# 5. open
open -a Simulator --args -CurrentDeviceUDID 0566AC33-9B91-2DR2-B5BB-C916D3BA8MD3
shutdown simulators
1
2
3
4
5
6
7
8
#help
xcrun simctl help shutdown
# shutdown all simulators
xcrun simctl shutdown all
# shutdown a specific device
xcrun simctl shutdown <device-uuid>
open url in device
1
2
3
4
5
# help
xcrun simctl help openurl
# usage
simctl openurl <device> <URL>
launch an app by identifier on a device
1
2
3
4
5
#help
xcrun simctl help launch
#usage
simctl launch [-w | --wait-for-debugger] [--console|--console-pty] [--stdout=<path>] [--stderr=<path>] [--terminate-running-process] <device> <app bundle identifier> [<argv 1> <argv 2> ... <argv n>]
terminate an app by identifier on a device
1
2
3
4
5
#help
xcrun simctl help terminate
#uage
simctl terminate <device> <app bundle identifier>
add media to the library of a device
1
2
3
4
5
#help
xcrun simctl help addmedia
#usage
simctl addmedia <device> <path> [... <path>]