Why does my iOS build fail with "exportArchive requires a provisioning profile with Push Notifications"?

Last updated: July 14, 2026

Context

When building an iOS app on Codemagic, the archive step may complete successfully, but the export step fails with an error similar to:

error: exportArchive "App.app" requires a provisioning profile with the Push Notifications feature

This can happen even when Push Notifications are correctly enabled in your provisioning profile in the Apple Developer portal. The issue is typically caused by an incorrect or manually configured ExportOptions.plist that does not properly reflect the required capabilities.

Answer

Instead of manually configuring or mapping an ExportOptions.plist, use Codemagic's built-in xcode-project build-ipa wrapper. This command automatically generates the correct ExportOptions.plist, ensuring all entitlements and capabilities (including Push Notifications) are handled properly.

Update your build script to the following:

- name: Build IPA for distribution
  script: |
    xcode-project build-ipa \
      --workspace "$CM_BUILD_DIR/ios/App/App.xcworkspace" \
      --scheme "App" \
      --archive-flags="-destination 'generic/platform=iOS'"

Replace the --workspace path and --scheme value with those matching your project. After updating the script, trigger a new build — the export step should complete successfully.