4

http://cl.ly/image/2K1H000s170l

Please refer to my screenshot. That's a manual way to set default device in iOS simulator. Can anyone tell me how to do that from command line? Many thanks!

I need that as part of my Jenkins project setup. Thanks a lot!

Haroldo Gondim
  • 7,725
  • 9
  • 43
  • 62

3 Answers3

1

You can use xcrun to open your device

xcrun instruments -w "iPhone 6 (8.4 Simulator)"

If you want to know all devices installed

xcrun instruments -s

If you need to build and install some app use.

xcodebuild -sdk iphonesimulator8.4 -arch i386 install DSTROOT=~/YourApp
xcrun simctl install booted ~/YourApp/Applications/YourApp.app
Haroldo Gondim
  • 7,725
  • 9
  • 43
  • 62
0

You can choose the device that is booted when the simulator launches by passing it on the command line. See Xcode 6 - Launch simulator from command line

Community
  • 1
  • 1
Jeremy Huddleston Sequoia
  • 22,938
  • 5
  • 78
  • 86
0

Yes as mentioned this is a duplicate.

But to answer your question,

You can use the instruments to launch the simulator of your choice. For Ex:

xcrun instruments -w "iPhone 6 (8.2 Simulator)"

"From the screen shot it seems like you are already on iOS 8. "

Gurubaran
  • 718
  • 8
  • 13