Creating an Adhoc Build Configuration & Scheme
This assumes you have already created your adhoc distribution profile and installed it into Xcode
- Duplicate the Release build configuration on the Project -> Info tab.
- Name the new configuration "Adhoc"
- Create a new Scheme, call it "Adhoc"
- Set the configuration setting of all build steps of the Adhoc scheme to use the Adhoc build configuration
- Give the Archive a descriptive name
- Under the target settings, search for Code Signing. Change both Adhoc entries to use the iPhone Distribution profile (Automatic selector).
- Select Archive from the Product menu
- Click the button that says "Distribute"
- Select the "Save for Enterprise or Adhoc distribution"
- Select the correct Code Signing Identity
- Save the IPA somewhere.
Note that you might find references to blog posts where they suggest you create an Entitlements.plist and add an entry called
get-task-allow set to false. This used to be required, but is not any longer.
No valid code signing identity found
This can happen if you haven't installed the distribution certificate. Look in Keychain Access on OS X, under the My Certificates section you should see your "Distribution" certificate with a private key below it. If not, you'll need to retrieve this private key from a previous export, or regenerate it from the portal.
App was signed with improper entitlements
This usually means either you have an Entitlements.plist with improper settings (you can delete this file if you're not using it for some other settings like iCloud or Push Notifications). It can also mean that your device was not part of the profile.