Here are some notes on how to build an ad hoc distribution and deploy your app onto another iOS device.

Overview

Deploying your application onto other iOS devices is non-trivial to say the least. Apple has done it’s best to document how it all works, but I found it extremely confusing and convoluted. So don’t feel you are alone if you are struggling.

There are two configuration steps we need to go through when creating an ad hoc distribution.

First we need to create something called a distribution via the iOS Provisioning Portal. Then we need to import that provision into XCode and use it as part of our build.

Note: I am not sure if this is required but some tutorials I’ve seen say you need an icon for your app. So to be save you may want to add one.

iOS Provisioning Portal

Register device(s)

First thing we need to do is register any devices we want to deploy our app onto. This part is actually pretty easy and this link shows you how to do it:

https://developer.apple.com/ios/manage/devices/howto.action

Create ad hoc provision

Here’s an example of what provisioning profiles look like (these I created).

There are two types of deployments you can make. Ad hoc or App store. Ad hoc is like a test deploy. You just want to make a build, and deploy it onto someone elses machine.

App store is self explanatory. Many of the steps we are doing here for ad hoc you can repeat for app store (just different selections in configuration).

Provisioning profiles are how apple tracks who can run your app, and on which devices. Here we want create a new ad hoc provision profile call Ad Hoc.

Here we just choose an App ID and then add any devices at the bottom you would like to include in the profile.

Deploy provision into XCode

Now that you’ve got a Ad Hoc provision setup, you need to get it into your XCode for a build.

Easiest way to do this is do download the provision you just created (if it says pending click another tab and come back once it’s enabled).

Then open XCode, and drag it onto the XCode docking icon at the bottom.

You can verify the provision distribution was imported by going Window -> Organizer clicking the ‘Devices’ tab and then the ‘Provisioning Profile’ section on the left.

Now we are done with the iOS Provisioning Portal and can switch to XCode.

XCode 4

Create a new configuration

Click on the project keyword, then your project, and then the ‘Info’ tab.

Then under ‘Configurations’ click the + sign and duplicate the ‘Release’ Configuration.

Setup your Target

Now we need to configure our Target (the thing below the blue project) so that the new configuration we just created uses the ad hoc provision we just created in the iOS Provision Portal.

Click the target for your app (just below your blue project keyword). Then find the ‘Ad Hoc Distribution’ we just created in XCode and point it to the ‘Ad Hoc’ provision distribution we created via the portal.

Setup your archive

Here we need to setup our archive build step so that it uses the ‘Ad Hoc Distribution’ we just created and configured in XCode.

Create the archive

Product -> Archive

If everything goes well you should see the archive like this:

Create the ipa

Highlighting the archive we just created click ‘Distribute’ and then choose the type of distribution you’d like to create (‘Ad Hoc’ in our case).

Click through the last couple menus then voila! You should have an ipa you can distribute to your friends.

Import via iTunes

Email or send the ipa to your friends and tell them to simply double click the ipa (which will open iTunes) and then sync with there device.

They should now have your app on their device.

Don’t give up

If these instructions don’t work for you don’t give up.

I struggled mightily to get ad hoc deploys going so if this works for you first time through consider yourself very lucky.

For the rest of us keep fighting and googling. Hopefully this tutorial will help.

Links that help

http://www.musicalgeometry.com/?p=1237
https://developer.apple.com/ios/manage/overview/index.action