Ad-Hoc App Distribution with XCode 4

The process of deploying to the app store was fairly simple using this new archive process. The only catch was editing the scheme to change the Archive option to use the AppStore code signing identity and using the Submit button instead of Share. Check out the app in the iTunes AppStore – Universal Unit Converters
So amongst the many nice features in XCode 4 comes the modified process for building your app for distribution. And with “The Google” not being entirely helpful about the process as well as the docs on the Apple developer site still containing the XCode 3 instructions I thought it would help at least somebody out there for me to document the process. Please note that since I haven’t built one yet for distribution to the app store this just covers ad-hoc distribution. Maybe I’ll update this when we release to the app store.
Interacting with the provisioning portal hasn’t changed. You still need to create your distribution profile and download it to your development machine. Once you’ve done that is where the process has changed.

Like in XCode 3 you still need to create a new configuration for your distribution build. Click on your project in the project navigator and click on the your project in the project editor. You should see something like this:

As before you’ll want to create a copy of your release configuration and name it something like “Ad-Hoc”. Once you’ve done that click on the “Build Settings” tab in the project editor. You should see something like this:

Change your Code Signing Identity to match your Ad-Hoc distribution provisioning profile. Now in the upper left hand corner of XCode next to the Run and Stop buttons click the Scheme dropdown and click Edit Scheme. In the scheme editor select Archive from the left side and change the Build Configuration to the configuration you created previously (Ad-Hoc for me):

Click OK to close it. Verify that you have a iOS device selected in the scheme dropdown in XCode and then select the Archive option from the Product menu:

This will build your project and create the archive. If the Organizer doesn’t pop up after it is done building  just open it by clicking the Organizer button:

Select your new archive and click the Share button (I imagine the Submit button here has to do with submitting to the app store):

Leave it on “iOS App Store Package (.ipa)” and select your distribution profile in the identity (you may be able to say “Don’t Re-sign” but I haven’t tried that yet) and click Next:

Save it to whatever location and now you have an IPA file to drag into iTunes.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>