iphone - Cordova: start specific iOS emulator image -


i'm developing cross-platform mobile app using cordova, focussing on ios in development stage.

for development process ideal if start cordova app directly command line , have load specified emulator. can running following project root directory:

$cordova run --debug --emulator ios 

this works fine, , results in ios-simulator running app in simulated iphone 4 retina ios 7.0.3

besides simulated device, test on (for instance) ipad. have these emulation images installed, , can start app in them manually in xcode. also, command list-emulator-images (located in project_dir/platforms/ios/cordova/lib) gives following output:

"iphone retina (3.5-inch)" "iphone retina (4-inch)" "iphone retina (4-inch 64-bit)" "iphone" "ipad" "ipad retina" 

however, thing is: can't seem figure out how start emulator in other default (which appears iphone retina (4-inch) emulation image). relevant output of cordova help gives following information:

run [--debug|--release]     [--device|--emulator|--target=foo]     [platform] ............................ deploys app on specified platform devices / emulators 

i've tried things following:

cordova run --debug --emulator=ipad ios

and many variations thereof, no luck. every time starts in same emulator.

the documentation command-line tool doesn't offer information in regard, , extensive google-search failed turn anything. missing trivial? or trying weird? hope here has experience this, , can provide answers.

thanks in advance!

edit: forgot mention explicitly; i'm doing on mac. mentioned earlier, running app in different emulators/simulators in xcode works fine.

to find out simulator images available can use 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 1 of simulator names in --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 simulator before launching different target simulator (on menu bar select simulator->quit)

take account may need quit ios simulator via menu switch 3.5 4 inch iphone.

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


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -