Xcode 6 - Launch simulator from command line

前端 未结 8 1175
执念已碎
执念已碎 2020-11-28 00:20

I want to launch iPhone simulator from command line.

until now I have been using the below command

/Applications/Xcode.app/Contents/Developer

8条回答
  •  猫巷女王i
    2020-11-28 01:08

    With Xcode 6, if you want to have the iOS Simulator.app boot a specific device when it launches, you can run this from the command line:

    open -a "iOS Simulator" --args -CurrentDeviceUDID

    where you can figure out the UDID of the device you want to boot from:

    xcrun simctl list

    With Xcode 7, the application was renamed Simulator.app, so you should update the above accordingly to:

    open -a Simulator --args -CurrentDeviceUDID

提交回复
热议问题