I have tried to run Ionic 3 app on Mac machine.No build errors and working fine on simulator.But I need to test it on Emulator hence I need to test the Native status bar plugin.Can you tell me why it gives below error? How can I run this on Emulator?
Note: I don't have an iOS device.Hence I'm using rented cloud Mac machine and try to test the iOS status bar implementation.
I have used this cli command:
> ionic cordova run ios
and this too ionic cordova emulate ios same issue.
global packages:
@ionic/cli-utils : 1.4.0
Cordova CLI : 7.0.1
Ionic CLI : 3.4.0
local packages:
@ionic/app-scripts : 1.3.8
@ionic/cli-plugin-cordova : 1.4.0
@ionic/cli-plugin-ionic-angular : 1.3.1
Cordova Platforms : android 6.1.2 ios 4.4.0
Ionic Framework : ionic-angular 3.4.2
System:
Node : v6.10.2
OS : macOS Sierra
Xcode : Xcode 8.3.3 Build version 8E3004b
ios-deploy : 1.9.1
ios-sim : 6.0.0
npm : 3.10.10
No target specified for emulator. Deploying to iPhone-SE, 10.3 simulator
Update:
When I run the > cordova run --list --emulator on Mac machine it shows huge list of emulators as like :
iPhone-6, 8.2
iPhone-6, 8.3
iPhone-6, 10.3
iPhone-6, 8.4
iPhone-6, 9.0
iPhone-6, 9.1
iPhone-6, 9.2
iPhone-6, 8.1
iPhone-6, 9.3
iPhone-6-Plus, 8.2
iPhone-6-Plus, 8.3
iPhone-6-Plus, 10.3
Update 2:
I have run this:
ionic cordova run ios --target="iPhone-6, 10.3"
It gives this error.Can you tell me why?
Error: Cannot read property 'name' of undefined
[ERROR] Cordova encountered an error. You may get more insight by running the Cordova command above directly.
[ERROR] An error occurred while running cordova run ios --target "iPhone-6, 10.3" (exit code 1).
Try this command:
ionic cordova run ios --target "iPhone-6"
I think there might be a bug on the current Cordova iOS that we cannot specify the target's iOS version, but at least we can specify the type of target's iOS device.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With