Code signing & build

exportOptions.plist

The property list that tells xcodebuild -exportArchive how to turn an archive into a distributable build: which method, team, signing style, and provisioning profiles to use.

ExportOptions.plistexport options plist-exportOptionsPlist

exportOptions.plist is the configuration file behind xcodebuild -exportArchive. The archive step produces one signed .xcarchive; the export step re-signs and repackages it for a specific destination (App Store, testers, enterprise), and every decision it makes comes from this plist. Nearly every iOS CI pipeline has one checked into the repo.

The method key

method picks the distribution type, which in turn decides which kind of provisioning profile the export needs. Recent Xcode releases renamed the methods; both spellings are accepted, but new projects should use the new names.

Method (current)Legacy nameUsed forProfile type
app-store-connectapp-storeApp Store and TestFlightApp Store profile
release-testingad-hocRegistered test devicesAd Hoc profile
debuggingdevelopmentDevelopment installsDevelopment profile
enterpriseenterpriseIn-house distributionEnterprise profile
developer-id / mac-applicationsamemacOS outside the App StoreDeveloper ID signing

A minimal automatic-signing example

xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
  "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>method</key>
  <string>app-store-connect</string>
  <key>teamID</key>
  <string>ABCDE12345</string>
  <key>signingStyle</key>
  <string>automatic</string>
</dict>
</plist>

Manual signing on CI

CI machines usually sign manually with a known certificate and profile, because automatic signing wants portal access mid-build. Manual style adds two keys: the certificate name and a map from bundle ID to profile.

xml
<key>signingStyle</key>
<string>manual</string>
<key>signingCertificate</key>
<string>Apple Distribution</string>
<key>provisioningProfiles</key>
<dict>
  <key>com.example.myapp</key>
  <string>MyApp App Store</string>
</dict>

The provisioningProfiles value is the profile's name or its UUID. Name matching is the common choice, and it is also the common failure: rename the profile in the portal (or regenerate it under a new name) and the export breaks until the plist is updated.

Other keys worth knowing

  • uploadSymbols (bool): include dSYMs so crash reports symbolicate. Defaults to true for App Store exports.
  • manageAppVersionAndBuildNumber (bool): lets the export bump the build number to the next valid one on App Store Connect.
  • destination (export or upload): upload sends the build straight to App Store Connect instead of writing an .ipa to disk.
  • thinning: device-variant thinning for ad hoc exports, usually left at <none>.

FAQ

Common questions about exportOptions.plist

Where do I get an exportOptions.plist?

Export a build once from the Xcode Organizer with the settings you want. Xcode writes the exportOptions.plist it used next to the exported .ipa. Copy that file into your repo and point xcodebuild -exportOptionsPlist at it.

What are the valid method values in exportOptions.plist?

app-store-connect (App Store and TestFlight), release-testing (registered devices), debugging (development), enterprise (in-house), and developer-id or mac-application for macOS. Older Xcode versions used app-store, ad-hoc, and development; those legacy names still work.

Do I need the provisioningProfiles key?

Only with signingStyle set to manual. Automatic signing resolves profiles itself, but needs portal access during the export, which is why CI pipelines usually go manual and list the profile per bundle ID. Include an entry for every target in the app, including extensions.

Why does exportArchive say no profile matches my bundle ID?

The name in provisioningProfiles does not match any installed profile, the profile expired, or it does not cover the certificate doing the signing. Check the exact profile name in the portal, confirm the profile file is installed on the build machine, and confirm it includes the signing certificate.

Keep reading

Related terms

Next step

Help articles on this topic

Notice a definition that has drifted? Email support@hexsign.io and we'll update it. Browse the full glossary or jump to the help center.

Try HexSign

Know before a certificate or profile expires.

HexSign tracks every Apple certificate and provisioning profile and alerts you ahead of expiry. The Free plan covers tracking and alerts. Paid plans renew them for you.