Create an IPA in XCode 4 for TestFlight
It took me a very long time to get a usable IPA out of XCode 4 that works with TestFlight so I thought i'd share the info incase anyone else can't get it to work!
This tutorial assumes you've generated your Ad Hoc distribution profile and have it installed on your machine. If you haven't done that yet, do it first.
Here we go:
Entitlements
- Right click on your Resources folder and select New File. Select the "Entitlements" file under "Code Signing" and on the next page call it "Entitlements.plist", then hit Save.
- There has been a lot of talk about what entries are needed in this file but I have found that I didn't have to touch anything the entry "Can be debugged" is left in its default YES state.
Project Settings
- Goto the project settings for your app
- In the left hand column click on the entry under PROJECT and select the info tab, you should see a list of Configurations such as "Debug" and "Release".
- Click on the little plus sign under the configurations and select "Duplicate Release Configuration", name the new configuration "Ad Hoc".
- In the left hand column again click on the entry under TARGETS which should flick you automatically to the build settings tab, if it doesnt just make sure you have selected it and goto the build settings tab.
- Now find and expand the item "Code Signing Identity" and under the "Ad Hoc" name change the provisioning profile to your ad hoc distribution profile.
- Look for and expand the "Code Signing Entitlements" item to find your new profile "Ad Hoc" again, set "Entitlements.plist" as the value.
Archive Scheme (this had me going for hours)
- At the top of the toolbar where you normally select your build target (iOS Device, iPhone Simulator, iPad Simulator etc) drop that menu down and select "Edit Scheme...".
- On the left hand side select the "Archive" scheme and then select "Ad Hoc" in the "Build Configuration" drop down and hit ok.
Creating an IPA
- You can now select "iOS Device" or your device name as your build target and select "Archive" from the main "Product" drop down which will in turn popup the organiser showing your new archive.
- From here click the "Share..." button, select "iOS App Store Package (.ipa)", make sure your Ad Hoc distribution provision is selected in the drop down list and hit next.
- Now you just save the ipa somewhere and upload it as normal to Test Flight...
Good luck!