The page http://ionicframework.com/docs/v2/cli/emulate/ need some improvements
About “–target” for example, how can i see a list of target device ?
The page http://ionicframework.com/docs/v2/cli/emulate/ need some improvements
About “–target” for example, how can i see a list of target device ?
Agree with you on the documentation.
These are from source code.
// target examples: cordova, browser, electron
target?: string;
// platform examples: ios, android, windows
platform?: string;
For example, to use these flags in cli
ionic build --target cordova --platform android --prod
Documentation seems to get its list of params from here:
https://github.com/driftyco/ionic-site/blob/master/content/_data/cliData.json
https://raw.githubusercontent.com/driftyco/ionic-site/master/content/_data/cliData.json
I am not sure if this is generated itself, but maybe add what is missing as a PR and see if it gets accepted.
I’m not, either, but it’s possible that it’s scraped from the various settings
variables in here.
But the problem is Docs !
Look: --device|–emulator|–target=FOO
What means FOO ?? which target list are accepted ?
I’ve tried many device name like “iPhone-6” , “iPhone 6” etc etc but no one works
Looking this file platforms/ios/cordova/lib/run.js i see this:
console.log('Examples:');
console.log(' run');
console.log(' run --device');
console.log(' run --emulator --target=\"iPhone-6-Plus\"');
console.log(' run --device --release');
console.log(' run --emulator --debug');
So i’ve tried: ionic run --emulator --target=“iPhone-6” but i’ve the same error:
Device type "com.apple.CoreSimulator.SimDeviceType.“iPhone-6"” could not be found.
Someone has discovered the right syntax ? is --target parameter working fine ??
My setting is this:
Cordova CLI: 6.5.0
Ionic Framework Version: 2.0.0
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.0.0
ios-deploy version: 1.9.1
ios-sim version: 5.0.13
OS: macOS Sierra
Node Version: v6.9.4
Xcode version: Xcode 8.2.1 Build version 8C1002
Thansk for help
Finally i’ve found the solution !
Ionic emulate does’nt work fine but cordova emulate yes !!
example: cordova emulate ios --target=“iPhone-7, 10.2” works running the right emulator !
execute this: ./platforms/ios/cordova/lib/list-emulator-images to have a list of target