Steps to Distribute an iOS App using a Website
One of the challenges that exist in an iOS dev shop, is how to distribute your app to devices for Beta testing. The Ad-hoc process that Apple supplies for creating an app for distribution is well documented. But how do we actually get the app on to our devices for beta testing. Wouldn’t it be great if we could just compile our app and put the app out on a website, then someone using an iOS device could just go to the website and install the app with a tap on a link. Best of all when ever you have a new version of the app you can just upload the app to the website and the users can just reinstall. Here I’m going to show you how to do it. It should take 10 minutes from start to finish.
- Get the UDID from new device using iTunes
- Add the device to portal
- Create a distribution profile
- Add the device to the distribution profile
- Synch Xcode to bring in the new profile
- Code sign your app with the new profile
- Build the app for archive, create the app for distribution
- Move the app, manifest file, profile to a website (code is included below)
- Create a link on a website pointing to app
- Give the URL out to users
- User goes to website with a device and installs the app by tapping on link
Identify the UDID of the device
Open up iTunes, connect device, click on summary, click on serial number and the UDID will show up. Use the mouse to copy this. It is a long string.
Add the New Device to the Portal
Go to the developer.apple.com website and go to the provisioning profile. Click on Devices. Click on Add Device.
Add the UDID and Name
Paste the UDID that you copied from the device and type in a name. Do this for each device that you want to register.
Create a New Distribution profile
You can edit an existing profile and then add the devices to the existing profile, but for this process I’m going to create a new profile. Note that I’m using the distribution tab of the provisioning profile setup.
I’m assuming that your development environment has a valid certificate. If your development profile in the organizer is showing “valid signing identity not found” then go to the developer.apple.com website and follow the instructions for creating a valid certificate. You must create a certificate from the computer that you want to run or download from an existing on that has been setup. Note: Make sure that you only have one certificate in the keychain access.
Identify the devices for the profile
In the new profile, enter a name, the app ID, and then devices. These are the devices that you want to have access to your app. You only have 100 total devices per year per developer profile. Submit and the go to Xcode, and from the organizer synch and the profile will brought in.
Give name to archive and code sign
Click on the Scheme then click on edit the scheme, assign a name, push ok
Go to the build settings, filter by code sign
Then Rebuild for Archive under the product menu. This will create an .ipa file.
Go to the Organizer/Archives click on the archive you created, click button DISTRIBUTE
Click on Ad-Hoc Distribution
Choose on the distribution profile to include
Create a simple website
Here is a simple website, with all contents that will enable a user to click a link.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Sample iOS OTA install</title>
<a href="itms-services://?action=download-manifest&url=<strong>http://192.168.1.123/nativeApp/manifest.plist</strong>"><font size="+4">Install the App</font></a>
Plist File (use text wrangler to edit)
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!-- array of downloads. -->
<!-- an array of assets to download -->
<!-- software-package: the ipa to install. -->
<!-- required. the asset kind. -->
<!-- required. the URL of the file to download. -->
<!-- required -->
<!-- required. the download kind. -->
<!-- required. the title to display during the download. -->
<string>iOS Test App</string>
Send out an email with url
If the user clicks on the link the app will be installed