Ad Hoc Profiles and Application Distribution via Web

Note: Check this post for new details how to setup ad hoc profiles over web for beta testing.

So after several hours of try and fail I have succeeded finally with distribution of Ad Hoc signed applications for beta testing via web. What does this mean? It means that now I have a way to distribute application without asking user to copy provisioning profile and application file to iTunes and then sync iPhone with it. Now, only thing that they need to do is to click on the link in e-mail, which will open website on device and there they can click to install application and profile on the iPhone.

Now I’m going to describe the whole procedure for this and I will include some screenshots from iPhone and Mac during the process.

Start with XCode closed.

The first step is to create distribution certificate for signing Ad Hoc provisioning profiles.

Open Keychain Access from finder or from Applications -> Utilities

Now in Keychain Access open Certificate Assistant - > Request a certificate from a certificate authority

Select Ad Hoc for distribution method, write profile name, select App ID for targeted application and select on which devices you are going to distribute application for test. Now click on Submit button.

Again refresh site after couple of a seconds and download provisioning profile.

Now double click on the provisioning profile to install it in XCode. XCode organiser will open and show provisioning profile in the list of profiles

It’s time to prepare application for distribution.

Open project and open project info.

Select configurations tab, chose Release configuration, click on duplicate button and name it Ad Hoc or whatever you like

Go back on Build tab and select Ad Hoc configuration

Find Code Signing, double click on Entitlements value field and write Entitlements.plist there

Now under Code Signing Identity check if right Provisioning profile is selected (the one that you have created and imported on the beginning)

Close project info

Now under the Group & Files click on the Project name and add new file

In file menu chose Code Signing and select Entitlements as file type, name it as Entitlements.plist and save under the root

Open Entitlements.plist and under the root add one boolean value with name get-task-allow and leave it as unchecked (false)

Chose Ad Hoc configuration and Device instead simulator

Open Build menu and select Build and Archive

When the project build is done XCode Organizer will open automatically and show Project name with one archived build under it

Click on that build and select share application

Confirm identity as iPhone Distribution and profile that you have created last and select save to disk to save .ipa file