Skip to content
Latchkey

Flutter "Xcode build done but archive failed" in CI

Flutter compiled the iOS app, but the Xcode archive or export step failed, almost always because of signing or export-options problems.

What this error means

flutter build ipa reports Xcode build done then Encountered error while archiving for device or an export failure. Compilation succeeded; archiving did not.

flutter
Xcode build done.                                            120.4s
Encountered error while archiving for device.
Error: No signing certificate "iOS Distribution" found

Common causes

Missing signing assets

The distribution certificate or profile is not on the runner, so the archive cannot be signed or exported.

Export options mismatch

The export method or team in ExportOptions.plist does not match the available signing assets.

How to fix it

Import signing assets and pass export options

  1. Import the distribution certificate and profile from CI secrets.
  2. Provide an ExportOptions.plist whose method and team match.
shell
flutter build ipa --release \
  --export-options-plist=ios/ExportOptions.plist

Manage signing with fastlane match

Use fastlane match or an API-key flow so the certificate and profile are present and consistent.

How to prevent it

  • Keep signing assets in CI secrets and align ExportOptions with them. iOS archiving requires a macOS runner; build for Android and run analysis on Linux to control cost.

Frequently asked questions

What causes ""Xcode archive failed""?
The distribution certificate or profile is not on the runner, so the archive cannot be signed or exported.
How do I fix "Xcode archive failed"?
Import signing assets and pass export options

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card