Creating .ipa File for Ad Hoc Distribution in Xcode 4

If you’ve ever tried to provide an Ad Hoc build to a tester using a Windows machine, you know the frustration involved with sending a .app file. Reason being, this file type is an “application bundle” which is a conglomeration of files and directories packaged as a single file. Windows doesn’t know how to deal with this file, which typically results in a frustrating app install process.

The answer is to create a .ipa file. There is a means to do this using iTunes, however, the process is somewhat of a kludge. With Xcode 4 there is now a direct way to create an .ipa file, without leaving the development environment.

The process is quite straightforward, first make sure the scheme is iOS Device

Next, from the Product menu, choose Archive. From the dialog, choose Share

Select the option for iOS App Store Package(.ipa) and choose a location to save the file.

As pointed out in the comments below, the provisioning file is embedded in the .ipa file so you no longer need to send both to your Ad Hoc users.

  1. Often creating an ipa for device testing is overkill.
    You can do the same by using the development provisioning after you added the devices’ UDID and edit the archive scheme.

    It takes a while to learn but Xcode4 has a lot of goodies… ;)

  2. Is the last step really necessary? I’m pretty sure the provisioning file is included in the .ipa. And by the way, Testflightapp.com is a nice way to distribute ipa-files to Ad Hoc users.

  3. Wow! Testflightapp seems really cool! But, I don’t see myself using it anytime soon: I don’t like the fact that I have to upload my unfinished (and crack-able) app to their servers.

    Thank you John for the update on Xcode usage. I like this posts very much because they are simple things that simplify my work greatly. :)

    Giacomo, I don’t understand your approach (mainly because I don’t know how to “edit the archive scheme” appropriately). I’m relatively new to this, you see. ;)

  4. XCode 4.3 has “distribute” instead of share. Then chose “save for end or ad hoc”, then the signing identity and finally, in the file selection dialog, click on the “save for end distribution”…
    The dialog expands and you can input an URL for the app to be downloaded and installed, along with the prov profile, DIRECTLY from the device (as iTunes does).
    It’s much better IMHO. And it works with individual dev accounts as well!

  5. errata: end is for ent (enterprise) in my previous comment

  6. To edit a scheme you tap on the name of your app at the top (next to the run button) and select edit scheme.
    You should already have 5-6 default schemes. on the left side of the new panel.
    Select “archive” and then change “build configuration” to “debug”.
    Hit Ok.
    Now when you do product –> archive (make sure you’re building for device and not simulator and you are using your development certificate) a new window opens when it’s done.
    Select “share…”, leave ipa selected, select your development certificate from the drop down and save location.
    Your IPA is ready to be emailed for beta testing.

    You can use the same process for submitting an app to the appstore.
    The only difference is you use your distribution certificate, select “release” as the archive scheme and after you do product –> archive select “submit…”.

    hope it helps!

    G

  7. The provisioning profile (listed as “matching profile” under Code Signing in the project options) is automatically embedded into the IPA. You don’t need to separatly send it to the testers.

Comments are closed.