Simplifying wireless iPhone app distribution with PHP

February 7th, 2011 § 6 comments § permalink

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.

Requirements:
A web server that runs PHP 5 with the following extensions:

  • ZIP
  • either MBString or Iconv
  • either BC or GMP or phpseclib

Installation/usage:

  1. Download and unzip the files into a new directory on your web server.
  2. Create a directory for each app you want to deploy (the directory cannot have any spaces in its name!).
  3. In this directory, put:
    • the .IPA file of your app, built using Xcode’s “Build & Archive” command (no spaces in the filename)
    • the .mobileprovision file (again, no spaces in the filename)
    • a 512×512 PNG file named iTunesArtwork.png (case-sensitive)
    • a 72×72 PNG file named Icon.png (case-sensitive)

    The directory structure should look like this:
    Directory layout for wireless app distribution PHP script

  4. 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.
  5. 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.

Download the files here.

Virtual Worlds

April 4th, 2008 § 3 comments § permalink

I am currently attending the Virtual Worlds conference in New York City. It’s quite a fascinating conference, covering full-blown 3D worlds (a la Second Life), browser-based paper doll communities (Stardoll) and everything in between. Flash is well-represented here; if it’s 2D or 2.5D virtual world (i.e. not a full 3D environment), it’s done in Flash, period (no sign of Papervision, Sandy 3D or other Flash-based 3D engines, though).

Today I attended a session introducing Electrotank‘s ElectroServer Universe Platform (they don’t have a section on their website for it yet, it’s that new!). It builds on their successful ElectroServer product, adding things like a high-performance isometric rendering engine, a world editor, and content management systems. It looks very advanced and quite impressive, and would probably give any developer wanting to create a virtual world a solid leg up. I will definitely investigate this platform further should I decide to extend bunnyhero labs in a more persistent-world direction.

Mod_rewrite

June 12th, 2007 § 0 comments § permalink

I’m futzing around with mod_rewrite again (I eventually plan to switch everything over to lighttpd, but until then…), and as I reread the docs, I remember how unhelpful diagrams like this are:

apache's mod_rewrite diagram... it's sooooo clear

Someday when I suss it out I might write my own mod_rewrite guide.

Where Am I?

You are currently browsing the Server category at bunnyhero dev.