After you’ve successfully compiled your app in XCode, you’ll want to make it available to beta testers. There are three methods that you can use to accomplish this.
1) Use an Ad-Hoc Distribution Method
2) Use an Ad-Hoc Distribution Method in combination with the TestFlight service to facilitate “over-the-air” (OTA) installs
3) Register for Apple’s iOS Enterprise Developer Program and distribute your app “over-the-air”
Using the Ad-Hoc Distribution Method
The Ad-Hoc distribution method enables testers to install your app on up to 100 devices. You’ll need to use this technique if you aren’t a member of the iOS Enterprise Developer Program ($299 annual fee). Users will need to email you their device’s UDID so that you can enter them into the provisioning portal.
Using this distribution method involves completing the following steps:
- Acquire the UDID of the beta-tester’s device
- Registering devices with the Provisioning Portal
- Create a distribution certificate, if none exists
- Create an Ad-Hoc Distribution Provisioning Profile
- Build an App Archive
- Code-sign the app using the Ad-Hoc Provisioning Profile
- Post the app to a webserver for download.
Acquiring a Test Device’s UDID
The steps that a user must perform to retrieve a device’s UDID are as follows:
- Tether the device to their laptop/desktop computer. iTunes should automatically launch.
- Click on the Devices button in iTunes (illustrated by Step 1, below)
- Click on the tethered device (illustrated by Step 2, below)
- Click on the Serial Number (step 3) – note that this is actually an invisible button. And no, I’m not making this up. The serial number will magically transform into the device’s UDID.
- Right-click on the UDID and select Copy Identifier (UDID). This will place the UDID onto the user’s clipboard.
- Paste the UDID into an email and send to the app developer.
Registering a Device with the Provisioning Portal
Once you, as the developer, have the beta-tester’s device’s ID, you should perform the following steps:
- Log into the provisioning portal
- Click on the Certificates, Identifiers & Profiles link
- Click on the Devices link
- Click on the [+] to register a test device. Enter the a description of your tester’s device, and paste the UDID that they sent to you in an email.
Creating a Distribution Certificate
If you haven’t already done so, you’ll need to create a distribution certificate as described by the following steps:
- Click on Certificates > Distribution
- Click the [+] to add a new certificate
- Select Distribution > App Store and Ad Hoc
- Click Continue
- Follow the steps to create a certificate signing request (CSR). Click Continue.
- Select your CSR and click Generate
- Click the Download button to download your certificate
- Double-click on your downloaded certificate to install it into KeyChain Access.
Creating an Ad-Hoc Provisioning Profile
- Return to the provisioning portal
- Click on Provisioning Profiles > All
- Click the [+] button
- Click on Distribution > Ad Hoc as illustrated below:
- Click Continue
- Select your App ID and click Continue
- Choose your iOS Distribution certificate and click Continue.
- Choose the devices that you want to use for testing your app as illustrated below:
- Click Continue
- Name the profile as illustrated below and click Generate.
- Download the resulting .mobileprovision file and then double-click to install it into XCode Organizer
Building an App Archive
You must now compile your app into a .ipa file by completing the following steps:
- Open your project in XCode
- On the Project Summary tab, illustrated below, enter a version number for your app (typically 1.0)
- Click on the Build Settings tab
- As illustrated below, verify that your Code Signing Identity for app Release is set to the distribution certificate contained in your Ad Hoc Testing provisioning file.
- Choose Product > Archive from the XCode menu. After you are prompted to code sign, your archived app should appear in Organizer as illustrated below. Note: If you get a build error “Command /usr/sbin/chown failed with exit code 1”, this indicates that you have a permissions issue with your xcode project directory. You can fix this by issuing the following command:
sudo chown -R [your osx account] [xcode project foldername]
sudo chown -R stevedrucker notifications
Distributing the App
- In Organizer, click on the Distribute button
- Click Save for Enterprise or Ad-Hoc Deployment
- Click Next
- Select your Ad-Hoc Testing Code Signing Identity and click Next. Your application will be codesigned.
- As illustrated below, click on the Save for Enterprise Distribution checkbox and fill in the URL of where you intend to post the app.
- Click Save.
- This will generate a .ipa file and a .plist file.
- Upload the .ipa file and .plist file to your web server.
- Configure your web server to support the following mime types:
.ipa application/octet-stream .plist application/xml
- Create an HTML page that contains a link that the user can click on in order to install the app. The hyperlink should be similar to the following:
<a href="itms-services://?action=download-manifest&url=http://training.figleaf.com/FigLeafNotifications.plist">Click here to download app</a>
Using a Third-Party Distribution Service
If you don’t have a webserver from which to distribute your app to testers, you can use a third-party service, such as TestFlight. TestFlight enables you to upload your ad-hoc provisioned app and generates a URL from which your testers can download and install the app. It also provides reporting metrics on who has installed the app, as well as notifies your testers whenever an update is available. It also enables you to revoke access to builds. By integrating the TestFlight API into your app, you can also quickly add customer feedback and review metrics on usage activity and crashes.
In order to use TestFlight, your testers must download and install the TestFlight app. While the installation process is quite smooth, you should send a note to your testers informing them of this requirement.
Distributing to an Internal Enterprise
Clearly, the major sticking point with the aforementioned procedures is Apple’s requirement that you register the UDID of each test device. You can bypass this requirement by applying to Apple’s iOS Enterprise Developer Program. Membership in this program enables you to generate an “in-house” provisioning file that does *not* require registration of test devices.
Once you have generated an In House provisioning file and installed it into XCode, you can complete the steps described previously under the heading “Distribute your App”, but use your in-house credential instead of an ad-hoc credential to code-sign the app.
Now that wasn’t too complicated, was it?
If you need help with your project or would like to be trained in the fine art of app development, please contact us at firstname.lastname@example.org