Provisioning an iOS App for Ad-Hoc Testing

by dcinglis

So you’ve written a hot new iOS app and tested it on your personal device, and everything seems to be going smoothly so far. But now, before you take the plunge and submit it to the App Store, you want to share it around with a few friends to get their feedback. After googling around for a few minutes, no painfully easy method for doing this jumps out at you. Unfortunately, Apple’s provisioning process is pretty complicated, but I’ll explain how I did it for my project to hopefully make the process smoother for you.

First, you’ll need to talk to all those friends and ask them for their device’s UDID. The easiest way to do this is to plug your device into a computer and open up iTunes. Navigate to the ‘summary’ page for your device. Directly to the right of the phone image should be a line that begins with ‘Serial Number’. Click on Serial Number and the info will toggle to the UDID. It should look something like this:

Screen Shot 2014-08-20 at 1.39.28 PM

You’re not gonna get my UDID that easily!

Once you have the UDID, you’ll need to register it under your approved devices list on your developer account. Go to your account here, then click on ‘Devices’. Click the plus button to add the new device, using the UDID you collected from earlier.

Now you’re ready to create an ad-hoc distributing profile, which is basically an authorization that allows you to run an app on an approved device. Go back to your apple developer account, then navigate to Provisioning Profiles. Click the + button to add a new profile, select ‘ad hoc’, then navigate through the other menus to create your profile. Make sure all the devices you just registered are checked when you get to the device authorization page. Once the provision is created, download & double-click to install it. Then, open Xcode, navigate Xcode → Preferences → Accounts, click on your account and hit View Details, then click the little refresh button in the lower left corner. The provisioning profile you just created should show up.

Now you need to generate a build of your app that your users can run on their devices. Still in Xcode, scroll through the list of available run targets in the upper left corner until you select either “iOS device” or your plugged in device (basically, the option that isn’t a simulator). Navigate to Product → Archive. A window showing your archives should pop up.

Screen Shot 2014-08-21 at 4.23.19 PM

Select the archive you just made, then click Export → Save for Ad-Hoc Development. Navigate through the menus, which will result in your creating a .ipa file. This is an iOS Package file, used to distribute your app.

Your friends can install this package on their device by plugging their device into a computer running iTunes, then double-clicking on the .ipa file. In iTunes, click on the Apps button that shows up next to the device details. Your app should be somewhere in the list of apps on the left side of the screen. Click on your app, hit install, then hit sync. The app should now be available to run on the device!

If you get stuck anywhere in this tutorial, Apple has published their own App Distribution Guide. I found it pretty difficult to follow, but it’s more thorough than my quick tutorial here so it could well cover some case I glossed over.