HOW TO: Ionic iOS Ad Hoc Release

This post will explain how to build an Ionic app and release it Ad Hoc for iOS devices. This mode of release is primarily used for iOS Beta testing.

Before deciding to release with this method, consider TestFlight; Apple’s solution to Beta releases. TestFlight will be the right option in many circumstances, but Ad Hoc might be the right option in some cases. It is particularly useful if you want testing to become available instantly and do not want to wait for Apple’s approval.

Requirements:

  • Mac
  • Xcode
  • Apple Developer Account

Variables

  • APP_NAME, found in package.json, e.g. “name”: “MyApp”
  • APP_ID, found in config.xml, e.g. <widget id=”com.softwarb.myapp”>

Ionic Build

$ cordova platform add ios --save
$ ionic cordova build ios --prod --release

** ARCHIVE FAILED **
The following build commands failed: Check dependencies

If it is the first time building, it will fail. The Ionic CLI has created the Xcode project, but failed to sign the app.

  • Open the Xcode project, found in platforms > ios > APP_NAME.xcodeproj
  • Within Xcode click on the APP_NAME project
  • You can see the error message: Signing for “APP_NAME” requires a development team.

Sign the App

  • Create a certificate for your Mac
    • Xcode > Preferences > Accounts
    • Add > Add Apple ID > Sign in with you Apple Developer Account credentials
    • Click on the account > Manage Certificates
    • Add > iOS App Store
  • Log on to your paid Apple Developer Account
  • Create an identifier for your app
    • Identifiers > App IDs > Add
    • App ID Description: APP_NAME
    • App ID Suffix > Bundle ID: APP_ID
    • Continue > Register > Done
  • Register the devices you want to download the app on
    • Devices > All > Add
    • Name is a description of the device, e.g. Ben’s iPhone
    • UUID is the device UUID
    • Continue > Register > Done
    • (Repeat for all devices you want to install the app on, or create a file and choose Register Multiple Devices)
  • Create a provisioning profile to combine your app, certificate and devices
    • Provisioning Profiles > All > Add
    • Select Distribution > “Ad Hoc”
    • (Note: Development > “iOS App Development” will allow you to run on Xcode to a device connected to your Mac)
    • Continue
    • App ID: Select your app ID, e.g. “APP_NAME  (XXXXXXXXXX.APP_ID)”
    • Continue
    • Select the certificate for your Mac
    • Continue
    • Select all the devices you to install the app on
    • Continue
    • Name the profile so you can recognise it
    • Continue > optional Download > Done

Xcode Build

  • Xcode > Preferences > Accounts
  • Select Account > Download All Profiles
  • Go to the Signing section, shown in the earlier screenshot
  • Check “Automatically manage signing”
  • Select the team
  • Run and Build the project, should be successful
  • Product > Archive
  • When the archive is complete, it will open an window like below
  • Export > Save for Ad Hoc Deployment
  • Next > Choose your Apple Developer Account
  • Select “Export one app for all compatible devices”
  • Next > Next
  • Fill in the manifest information with placeholder information
    • App URL: https://www.example.com/app_url
    • Display Image URL: https://www.example.com/display_image_url
    • Full Size Image URL: https://www.example.com/full_image_url
  • Export

Create a download link

  • Upload APP_NAME.ipa to Dropbox
  • Upload the icon image to Dropbox
  • Get the shareable link for IPA file and the icon
    • IPA: https://www.dropbox.com/s/abcdefghijklmnop/app.ipa
    • Icon: https://www.dropbox.com/s/abcdefghijklmnop/icon.png
  • Open manifest.plist with Xcode and expand all the items
  • Use the Dropbox links for the IPA file and icon
  • Replace https://www.dropbox.com with https://dl.dropboxusercontent.com
  • The file should look like below
  • Save manifest.plist and upload to Dropbox
  • Get the sharable link
    • https://www.dropbox.com/s/abcdefghijklmnop/manifest.plist
  • Create an install_ios.html file with a link to download and install your app
    • Use the below code as the download button
    • Use your manifest.plist shareable link
    • Replace https://www.dropbox.com with https://dl.dropboxusercontent.com
<a class="button button-primary" href="itms-services://?action=download-manifest&url=https://dl.dropboxusercontent.com/s/abcdefghijklmnop/manifest.plist">Download</a>
  • Upload the install_ios.html file to your website
    • GitHub Pages offers a free solution to hosting your html files
  • Open Safari on you device and visit the install webpage, e.g. https://username.github.io/install_ios.html
  • Click on the download button
  • The app will be installed on your device

Related

1 thought on “HOW TO: Ionic iOS Ad Hoc Release”

  1. Great tutorial but I think a lot of the Xcode parts have changed with Xcode 10.

    That being said i think i got through all of it but clicking the Download link on website in Safari does nothing. 🙁

Leave a Comment

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