Testing AdHoc iOS Apps, over-the-air, without TestFlight or iTunes

While building and testing the various apps I’m putting together, I eventually come up against the often hair-pulling exercise of having to submit the app to iTunes Connect, just for the alpha or beta testing phases.

Back in the day, sites like TestFlight made this relatively painless to get your test app onto you tester’s devices using a simple link in an email. With *no iTunes syncing required*!

“What witchcraft is this?”

Then Apple bought TestFlight and integrated the whole process in to their iOS Developer site.

This was all good, until recently when I was up against the wall with a deadline to get an app to a good friend who was travelling to a conference where there would have been many people potentially interested in what I’ve been building.

At the last minute, it dawned on me : I needed to get Apple to “approve” my app for TestFlight. This can take time. Days even. As a result the deadline was missed. Thanks Apple.

Before you mention it: yes, as long as I have my tester’s device UDID in my AdHoc Provisioning Profile, I can simply send him the .ipa file and he can drag and drop the file onto iTunes and sync. This is all well and good when your tester has access to their laptop and iTunes, but no good if they’re not.

So I started looking at alternatives I’d heard of, such as HockeyApp, SuperSend and others. Some of these are free and some are paid.

Naturally, being a hacker/programmer/nothing-gets-in-my-way/surely-I-can-do-this-myself-for-free kinda guy, I looked deeper into how this was done.

It turns out that it’s VERY EASY:

All you need are three files:

  1. Your app .ipa file
  2. A manifest.plist file
  3. A simple index HTML file

.. and somewhere to host them.

NOTE: You probably already know this, but your ipa file must be packaged with the ‘AdHoc Provisioning Profile’ for that app, which MUST contain the device UDID for each of your tester’s devices. This must be generated on the iOS Developer Portal. If anyone tries the download link on an unknown device, it won’t work. 

Construct a manifest.plist file like this :

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>items</key>
        <array>
            <dict>
            <key>assets</key>
            <array>
                <dict>
                    <key>kind</key>
                    <string>software-package</string>
                    <key>url</key>
                      <string>https://mojomeja.com/app/1.0.4/mojomeja.ipa</string>
                   </dict>
                </array>
               <key>metadata</key>
               <dict>
                   <key>bundle-identifier</key>
                   <string>COM.YOUR.APPID</string>
                   <key>bundle-version</key>
                   <string>1.0.0</string>
                   <key>kind</key>
                   <string>software</string>
                   <key>title</key>
                   <string>YOUR APP NAME</string>
               </dict>
           </dict>
      </array>
    </dict>
</plist>

..being sure to edit the .ipa download url and the app bundle identifier string, version and title.

Next, make an index.html file to provide a link for your testers to click on the device to start the on-device, “over the air” app download.  eg:

<!DOCTYPE html>
<html>
<head>
 <meta name="viewport" content="width=device-width,user-scalable=no,shrink-to-fit=no,minimum-scale=1,maximum-scale=1" />
 <title>MY AWESOME APP TESTING</title>
</head>
<body>
 <h2>test builds</h2>
 <a href="itms-services://?action=download-manifest&amp;url=https://yourdownload.com/url/to/manifest.plist">My APp version 1.0.0</a>
</body>
</html>

Then, simply send this url to your testers to open on their device in the email client or browser.

DONE!

Hat tip to Dr. Palanijara (and Google, obviously).