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.
Overall Process
- 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 rsynch 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
Save File
Create a simple website
Here is a simple website, with all contents that will enable a user to click a link
Website Code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Sample iOS OTA install</title>
</head>
<body>
<a href="itms-services://?action=download-manifest&url=http://192.168.1.123/nativeApp/manifest.plist"><font size="+4">Install the App</font></a>
</body>
</html>
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">
<plist version="1.0">
<dict>
<!-- array of downloads. -->
<key>items</key>
<array>
<dict>
<!-- an array of assets to download -->
<key>assets</key>
<array>
<!-- software-package: the ipa to install. -->
<dict>
<!-- required. the asset kind. -->
<key>kind</key>
<string>software-package</string>
<!-- required. the URL of the file to download. -->
<key>url</key>
<string>http://192.168.1.123/nativeApp/TheElements.ipa</string>
</dict>
</array><key>metadata</key>
<dict>
<!-- required -->
<key>bundle-identifier</key>
<string>com.yourcompany.TheElements</string>
<!-- required. the download kind. -->
<key>kind</key>
<string>software</string>
<!-- required. the title to display during the download. -->
<key>title</key>
<string>iOS Test App</string>
</dict>
</dict>
</array>
</dict>
</plist>
Send out an email with url
http://192.168.1.123/nativeApp/index.html
If the user clicks on the link the app will be installed
Links
http://support.apple.com/kb/HT4061 http://mobiledevelopertips.com/xcode/distribute-ad-hoc-applications-over-the-air-ota.html
About the Author
Michael
Irschick, Product Manager, brings over 20 years of technical product
development experience to 3Qi Labs including Systems Architect,
Technology Manager for Wells Fargo, Founder of Penguin Systems and a
Director at Primitive Logic. As a product manager at 3Qilabs, Michael
leads the design and development of our first-in-class test automation
software product Awetest. He actively works with customers and partners,
both individually and in webinars and user conferences to understand
the challenges that exist in enterprise software development and
communicates how software test automation can provide solutions to these
problems.
More posts by
Michael Irschick
Visit Website