Simulate and Build with Platform-Specified SDK
If you need to use platform-specified features like camera, network and Bluetooth from your Ionic app, you need to build with specified platform SDK. Besides, you can also simulate with specified platform SDK by:
- cd C:\workspace_ionic\myApp1\
- running the below commands
- for Android => “ionic platform add android”
- for IOS => “ionic platform add ios”
- for Windows Phone => “ionic platform add wp8”
Please note that you need to have OS X operating system for IOS build.
Before building with specified platforms, specified SDK may need to be installed:
- Android
http://cordova.apache.org/docs/en/5.0.0/guide/platforms/android/index.html
- IOS
http://cordova.apache.org/docs/en/5.0.0/guide/platforms/ios/index.html
- Windows Phone
http://cordova.apache.org/docs/en/5.0.0/guide/platforms/wp8/index.html
You can find other platforms from http://cordova.apache.org/docs/en/5.0.0/guide/platforms/
After adding specified platforms to your app, you can build with specified platform by:
- cd C:\workspace_ionic\myApp1\
- running the below commands
- for Android => “ionic build android”
- for IOS => “ionic build ios”
- for Windows Phone => “ionic build wp8”
- then, you can find your platform-specified source codes under:
- for Android => C:\workspace_ionic\myApp1\platforms\android\
- for IOS => C:\workspace_ionic\myApp1\platforms\ios\
- for Windows Phone => C:\workspace_ionic\myApp1\platforms\wp8\
Finally, you can simulate your app by running the below commands:
- for Android => “ionic emulate android”
- for IOS => “ionic emulate ios”
- for Windows Phone => “ionic emulate wp8”