Ionic Cookbook
上QQ阅读APP看书,第一时间看更新

How to do it...

  1. Add the specific platform (such as iOS) and build the app using the following command line:
$ ionic cordova platform add ios
$ ionic cordova build ios
  1. Note that you need to add the platforms to build the app. However, if you use the standard template from the Ionic CLI, it should already have the iOS platform included. To build and run for Android, you can replace iOS with Android.
  2. To emulate the app using the ios emulator, use the following command line:
$ ionic cordova emulate ios
  1. To run the app on the actual physical iPhone device, use the command line as shown:
$ ionic cordova run ios --device