Cordova: start specific iOS emulator image

前端 未结 10 2299
暗喜
暗喜 2020-12-07 07:07

I\'m developing a cross-platform mobile app using Cordova, focussing mainly on iOS in the development stage.

For my development process it would be ideal if I could

10条回答
  •  臣服心动
    2020-12-07 07:42

    To find out what are the simulator images available you can use to list them

    $ cordova emulate ios --list
    Available iOS Virtual Devices:
        iPhone-4s, 9.3
        iPhone-5, 9.3
        iPhone-5s, 9.3
        iPhone-6, 9.3
        iPhone-6-Plus, 9.3
        iPhone-6s, 9.3
        iPhone-6s-Plus, 9.3
        iPad-2, 9.3
        iPad-Retina, 9.3
        iPad-Air, 9.3
        iPad-Air-2, 9.3
        iPad-Pro, 9.3
    

    Then use one of the simulator names in the --target parameter:

    cordova emulate ios --target="iPhone-4s, 9.3"
    cordova emulate ios --target="iPad-Air-2, 9.3"
    cordova emulate ios --target="iPhone-6s, 9.3"
    cordova emulate ios --target="iPhone-6-Plus, 9.3"
    

    Important Quit the simulator before launching a different target simulator (On Menu bar select Simulator->Quit)

    Take into account that you may need to quit the iOS simulator via menu to switch from 3.5 to 4 inch iPhone.

    dynamic list is available in platforms/ios/cordova/lib/list-emulator-images

提交回复
热议问题