iOS 4.0 came with the ability to distribute your ad hoc apps over the air, which is very convenient for testers. More details are available on Apple’s website. Unfortunately, doing this manually can be a bit of a hassle, partly because the everything in the XML manifest requires absolute URLs.
I’ve created a PHP script that makes this task somewhat easier.
A web server that runs PHP 5 with the following extensions:
- either MBString or Iconv
- either BC or GMP or phpseclib
- Download and unzip the files into a new directory on your web server.
- Create a directory for each app you want to deploy (the directory cannot have any spaces in its name!).
- In this directory, put:
.IPAfile of your app, built using Xcode’s “Build & Archive” command (no spaces in the filename)
.mobileprovisionfile (again, no spaces in the filename)
- a 512×512 PNG file named
- a 72×72 PNG file named
The directory structure should look like this:
- Now visit the web page that corresponds to the directory where you unzipped the files. You should see something like this:
with one entry for each directory.
- Visit the same page on an iOS device running iOS 4.0 or higher. You should be able to install the app simply by tapping on the corresponding “app” link. You shouldn’t need to install the provisioning profile separately, but if you do, it can also be installed via the web site by tapping on the “provisioning profile” link.
That’s it. I admit the code is a bit of a mess, as it was hacked together relatively quickly. I haven’t been able to get it working when there are spaces in the names of the files or directories. Perhaps someone else can fix that :)
This code uses the very useful CFPropertyList PHP library by Rodney Rehm to parse the Info.plist file that’s in the IPA, to extract all the info required by the XML manifest. That’s how the magic happens.