xcode - How can I launch the iOS Simulator from Terminal? -


i can build using xcode command line tools, there way can run application using them? (e.g. equivalent pressing cmd+r in xcode)

first decide device want use:

xcrun simctl list 

this give list of devices:

-- ios 9.0 --     iphone 4s (56632e02-650e-4c24-aaf4-5557fb1b8eb2) (shutdown)     iphone 5 (acd4db7b-9fc9-49d5-b06b-ba5d5e2f5165) (shutdown)     iphone 5s (a8358b76-ad67-4571-9eb7-fff4d0ac029e) (shutdown)     iphone 6 (1d46e980-c127-4814-a1e2-5be47f6a15ed) (shutdown)     iphone 6 plus (fd9f726e-453a-4a4c-9460-a6c332ab140b) (shutdown) 

choose id (eg. fd9f726e-453a-4a4c-9460-a6c332ab140b) want (you can create own device using xcrun simctl create if want).

boot simulator device (replacing your-device-id id)

/applications/xcode.app/contents/developer/applications/simulator.app/contents/macos/simulator -currentdeviceudid <your-device-id> 

now should able use simctl install , launch commands.

xcrun simctl install <your-device-id> <path-to-application-bundle> xcrun simctl launch <your-device-id> <bundle-id-of-app-bundle> 

xcrun simctl help more details. note booting device using simctl not (xcode 7.2) allow else device such launch or install applications. need launch device in simulator interesting. also, cannot delete device in use simulator, have quit/kill simulator before attempting delete anything.


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -