How to Build the .ipa Package With Apache Cordova or Ionic Framework Command-line Tools

ipaBuilding application package file for Android platform (.apk) is trivial, you can do it with simple command like ‘cordova build android’ or ‘ionic build android’. But building .ipa package file (for iOS platform) is not so trivial, so we’ll take a look how to do this.

An .ipa file is an iOS application archive file which stores an iOS app. Each .ipa file includes a binary for the ARM architecture and can only be installed on an iOS device. Files with the .ipa extension can be uncompressed by changing the extension to .zip and unzipping.

© Wikipedia

First of all, you’ll need to have your provisioning profile and signing identity. You can see list of signing identities with the following command:

Choose required identity from this list and open platforms/ios/cordova/build-release.xcconfig. There you’ll find the following lines:

You’ll need to replace SOMEWORDS with you signing identity name (it’s a good idea is to automate it for example via Cordova hook).

Now you can build the application:

I don’t know why ionic requires to do it twice, but with single command you’ll not get right results. For Ionic 2, you’ll find your .ipa file in ‘/platforms/ios/build/device/APPNAME.ipa’. But for Ionic 1, you’ll need one more step:

This will generate .ipa file for you. That’s all you need to know about creating .ipa files via command-line.

8 thoughts on “How to Build the .ipa Package With Apache Cordova or Ionic Framework Command-line Tools”

  1. Hi,


    When executing


    ionic build ios –device –release

    The result is:


    Check dependencies

    appName requires a provisioning profile. Select a provisioning profile for the “Release” build configuration in the project editor.

    Code signing is required for product type ‘Application’ in SDK ‘iOS 10.2’


    1. Hi,

      you have to setup provisioning profile via xcode first. Or you can also specify the provisioning via build-release.xconfig file

        1. Tom,

          Use the below attribute to update the provisioning profile

          PROVISIONING_PROFILE_SPECIFIER = “provisioning profile name”

  2. Hello!

    The command “security findidentity v p codesigning”  results in an error. The error message says “The term security is not recognized as a command…”.  Is there something I’m missing?  Please let me know.

    By the way, I’m running this command on my windows power shell for an ionic (version 4) project.


    Thanks much.

Leave a Reply

Your email address will not be published. Required fields are marked *