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:

  1. cd C:\workspace_ionic\myApp1\
  2. running the below commands
    1. for Android => “ionic platform add android”
    2. for IOS => “ionic platform add ios”
    3. 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:

  1. Android

http://cordova.apache.org/docs/en/5.0.0/guide/platforms/android/index.html

  1. IOS

http://cordova.apache.org/docs/en/5.0.0/guide/platforms/ios/index.html

  1. 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:

  1. cd C:\workspace_ionic\myApp1\
  2. running the below commands
    1. for Android => “ionic build android”
    2. for IOS => “ionic build ios”
    3. for Windows Phone => “ionic build wp8”
  3. then, you can find your platform-specified source codes under:
    1. for Android => C:\workspace_ionic\myApp1\platforms\android\
    2. for IOS => C:\workspace_ionic\myApp1\platforms\ios\
    3. for Windows Phone => C:\workspace_ionic\myApp1\platforms\wp8\

Finally, you can simulate your app by running the below commands:

  1. for Android => “ionic emulate android”
  2. for IOS => “ionic emulate ios”
  3. for Windows Phone => “ionic emulate wp8”

Please rate this