How to create an IPA (Xcode 4)

Last Updated: Feb 15, 2013 09:28AM PST

Note: If you're using Xcode 4.3 or newer, refer to this tutorial instead.


With the release of Xcode 4, there have been a lot of issues with people being unable to package their applications as IPAs. The new version of Xcode, while making a lot of tasks easier and more streamlined, has caused some confusion due to some internal changes that have not been terribly well documented. In this tutorial we will walk you through setting up your project so you can create an ad hoc IPA suitable for beta distribution. Thanks as well to @nkostelnik for his recent tutorial on this topic.
 
NOTE: this tutorial only covers how to configure your project in order to package the application as an IPA. It does not cover how to create or migrate a project with or without 3rd party libraries.

NOTE: You will need an Apple Developer or Enterprise account to prepare an .IPA to be distributed.
 
Create Entitlements
1. Go to File -> New -> New File.
2. Under Code Signing, select Entitlements. Leave the filename as Entitlements.plist.



3. Select the newly added Entitlements.plist file and change the Can Be Debugged (get-task-allow) key to NO.


 

There has been a lot of debate as to whether this key needs to be set to NO as a lot of people have stated that their ad hocs work fine with it set to YES. We aim to stay inline with Apple's documentation for creating ad hocs and their most recent documentation on the Developer Portal states that this value should be NO. We would encourage developers to stay consistent with Apple's workflow should they decide to make internal changes in future OS or IDE releases.

Setup the project for Ad Hoc Distribution
1. In the left panel, select your project
2. Under the PROJECT section, select your project to open up the project settings
3. Under configurations, click the + button and select "Duplicate "Release" Configuration". Name the new configuration "Ad Hoc"



4. Under the TARGETS section, select your application target
5. Go to Build Settings and ensure the "All" option is selected
6. Under "Code Signing" select the "Code Signing Entitlements" key and click the expand arrow to reveal the per-configuration options
7. In the "Ad Hoc" configuration, enter Entitlements.plist. If you named your Entitlements file something else, enter than name instead.



Configure Archive Scheme
1. In the scheme dropdown in the top-right of the IDE, select iOS Device and click Edit Scheme



2. In the scheme editor window, select the "Archive" scheme in the left and change the Build Configuration setting to "Ad Hoc"



Archiving and Packaging
1. Select the iOS Device option in the Schemes drop-down
2. Under the Product menu, select Archive
3. In the Organizer window that appears (go to Window -> Organizer if it does not), select Archives at the top, your application on the left, and the most recent archive at the bottom, and click Share



4. Select iOS App Store Package (.ipa) in Contents and the appropriate Distribution code signing identity in the drop-down


 

  1. Click Next and enter the name of your IPA to save it
  2. Upload your application to TestFlight

Setup build settings for 3rd party libraries
If you are migrating from Xcode 3, or are using cross-project referenced to build 3rd party libraries, and do not get the option to package your app as an IPA when sharing, you may need to modify some of their build settings. This is the biggest holdup for a lot of developers as this was not needed in Xcode 3. This tutorial assumes you are using cross-project references to build your libraries. In the project settings for each 3rd party project, ensure that the Skip Install value is set to YES, otherwise when you attempt to create an IPA you will only get the option to create an .xcarchive file.

Note
If you are migrating from Xcode3, most of the build configurations, schemes, etc. will migrate as well.

Support hours are 8am-6pm PST. Please send a detailed email if you are having issues. Thanks for using TestFlight!


Contact Support


support@testflightapp.com
http://assets03.desk.com/
false
testflightapp
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete