So, this is my contribution to the confusion of articles on making a release build for an iOS App.
On the 29th of August of 2012 with XCode 4.4, Mac OS Lion 10.7.4 and iOS 5 these are the steps on making a release build for Ad-Hoc distribution of an iOS app.
First go to https://developer.apple.com and log in. The page will look like this
Register DevicesThe devices to which you intent to install your app need to be registered in your account.
Click on iOS Provisioning Portal
Click on Devices and the on Add Devices
To add a Device you need any name and a Device ID. To get the Device ID you have to
- Connect your device to your Mac
- Open Itunes
- On the summary page
- In there you will see the Serial Number of your device
- Click on the Serial Number and you will see the Device ID
- Click command-c (Mac) or ctrl-c (Windows) to copy it to the clip board. You can then paste it on the iOS Provisioning Portal or send it by email to whoever is registering your device
Give a name to the device and the Device ID and click Submi. You can register up to 100 devices.
Create an App ID
Your app must have an AppID
Click App IDs. On the tab Manage click New App ID.
- Write a intuitive name for your App ID in the Description
- Select your Team ID. You should have one from your Apple Developer License
- The Bundle Identifier must be the same as in your Project. Go to XCode to get it
Create the Distribution Provisioning Profile
On the same page click on Provisioning on the left, then the Distribution tab and then New Profile button
- Select Ad Hoc
- Choose a intuitive profile name
- Click New Profile button
After submitting the profile it will be available in the profiles page. Once it is active, should take a few seconds (must refresh the page), you can download it.
After downloading the profile you must install it on XCode. You can drag and drop the file to your XCode icon
After this the XCode’s Organizer will open and you can check for the profile
Create the Distribution Archive
Now back to XCode. Select the Project and the info tab.
In the configuration Table add a new configuration. Click the plus sign to duplicate the Release configuration
Name the new configuration Ad-Hoc. It will look like this at the end.
Now, still in the Project view, go to Build Setting tab.
The Ad-Hoc configuration is in the Code Signing Identity table.
In the row named Ad-Hoc and sub-row named Any iOS SDK click on the AdHocTestApp row to select a profile
And select the profile you created on the Apple Developer Portal
Next, click on the Scheme selection button on the top left
and select Edit Scheme
Select Archive on the left.
Select the Ad-Hoc Build Configuration and click Ok
You are now all set up ( Finally!!! ) to create the distribuition package.
- Click on the Scheme selection button and select iOS Device
- Build you App
- After it finishes select Archive
The Organizer window will open after the archiving finishes
Now click on Distribute
Select Save for Enterprise or Ad-Hoc Deployment
On the next window choose your Ad-Hoc profile and click next.
Select where you want to save the .ipa package, I chose the desktop.
At this point you have two choices regarding Save for Enterprise Distribution check box
- Install the app through iTunes. Leave it uncheked
- Download and Install the app on the iPhone through a webpage. Check it.
If you choose the first option the file AdHocTestApp.ipa will be created on the desktop and you can now drag and drop it to you iTunes and then synchronize the app. The Profile you created is embedded in .ipa package. And you're done! Congratulations!!
Or not... If you choose the second option there are still a few more steps. So keep reading.
- Choose a name for the package
- Check the Save for Enterprise Distribution option
- Type the URL of the location of the .ipa in your server
- Add a title
I haven’t tested the subtitle and image URLs yet.
This will generate two files in your desktop
You have to copy this files to your server to the location you specified above
The next step will be creating a web page form which you can donwload the app. This is the simplified version.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<title>AdHoc Test App</title>
Tap here to install AdHocTestApp
Notice that the href link is not the .ipa but .plist
You are all done!
note: in my case I am using an Microsoft server and I had to add the corresponding MIME Types for the .ipa and .plist. (no screen shots, sorry)
- Go to IIS Manager
- Locate you web site folder
- Right click and select Properties
- Open HTTP Headers tab
- Click on MIME Types button at the bottom
- Click New... button and add these two
- .ipa application/octet-stream
- .plist text/xml
Now, on your device, navigate to the page and download and install the app.