I checked this with Xcode 9. To close all active simulators, do:
xcrun simctl shutdown all
To reset all simulators, do:
xcrun simctl erase all
You can filter the simulator to close / reset as follows:
xcrun simctl shutdown F36B238F-3ED6-4E10-BB5A-0726151916FA xcrun simctl erase F36B238F-3ED6-4E10-BB5A-0726151916FA
Find all available simulators (and their GUIDs) on your computer as follows:
xcrun instruments -s
To run any simulator by GUID:
xcrun instruments -w F36B238F-3ED6-4E10-BB5A-0726151916FA -t Blank
To install the application on a downloaded simulator:
xcrun simctl install booted /path/to/your.app
To remove an application from a loaded simulator:
xcrun simctl uninstall booted /path/to/your.app
To run the application in a loaded simulator:
xcrun simctl launch booted "com.app.bundleIdentifier"
com.app.bundleIdentifier is your CFBundleIdentifier in Info.plist
LGFox Apr 28 '18 at 12:49 2018-04-28 12:49
source share