In this tutorial, you will learn, the list of available iOS emulator for Ionic 2 project on Mac OS Sierra operating system. And how to run the Ionic 2 application using the specific iOS emulator instead of using the default iOS emulator.
In iOS, if you are not mentioning the iOS emulator, it will try to load the application using the default iOS emulator. So let's see how to run the application using the specific iOS emulator.
Please use the below link to learn, how to install the Ionic on Mac OS Sierra. Ignore if you already did this.
Please use the below link to learn, how to install the Xcode Editor on Mac OS Sierra. Ignore if you already did this.
Now create a new Ionic2 project using the below command.
ionic start newapp blank --v2
You can able to see the list of installed platforms using the below command.
cd newapp ionic platform
amazon-fireos ~3.6.3 (deprecated)
In Mac OS, the iOS platform by default added to the Ionic 2 project when you are creating the new Ionic 2 project. So there is no need to add the iOS platform.
If you want to add the iOS platform use the below command.
ionic platform add ios
Execute the below command inside your Ionic 2 project to see the list of available iOS emulator
Apple-TV-1080p, tvOS 10.1
Apple-Watch-38mm, watchOS 3.1
Apple-Watch-42mm, watchOS 3.1
Apple-Watch-Series-2-38mm, watchOS 3.1
Apple-Watch-Series-2-42mm, watchOS 3.1
The above command displays the available iOS emulator. These emulators won't come by default. You have to download and install those iOS emulators using the Xcode emulator.
If you are not specifying the target emulator, it will try to load the iOS Ionic 2 app on the default iOS emulator.
ionic run ios
However, if you want to run the Ionic 2 application on a specific iOS emulator, use the below command
ionic emulate ios --target="Emulator Name"
For iPhone 6s
ionic emulate ios --target="iPhone-6"
Mac OS Sierra
Xcode Editor Version 8.2.1
Below are Ionic 2 info while writing this tutorial.
Cordova CLI: 6.5.0
Ionic Framework Version: 3.1.1
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.3.7
ios-deploy version: Not installed
ios-sim version: 5.0.13
OS: macOS Sierra
Node Version: v6.10.0
Xcode version: Xcode 8.2.1