How to compile Ionic App for platform ios from command line


Hi everybody !

I have been using Ionic 2/3 for a quite a while now on Windows for compiling my apps on platform android, and I’m now making my first steps on the platform ios using a Mac, and I’m having trouble finding the correct process to compile and sign the app.

I’m trying to figure out the correct command line parameters that should be used to compile a Ionic app in both DEBUG and RELEASE mode for platform ios ?

For example for platform Android I use the following command to generate a DEBUG apk:

ionic cordova build android --debug --aot

…and to generate a RELEASE apk I use the following :

ionic cordova build android --release --prod --aot 
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore myapp.keystore -storepass <store-key> android-release-unsigned.apk <key-name>
zipalign -v 4 android-release-unsigned.apk android-release-signed.apk

What would be the equivalent commands I should type on my Mac to compile for platform ios for DEBUG and RELEASE an ipa ?




To build for iOS you need a Mac. The only way to build using Windows is by using Ionic Pro and installing mac in a VM.


Yes I know ! I do have a Mac. I’m asking what command line (on my mac of course) I should use to compile my project ?

Could somebody give me a hand with this ?