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.
Xcode build done. 120.4s
Encountered error while archiving for device.
Error: No signing certificate "iOS Distribution" foundCommon 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
- Import the distribution certificate and profile from CI secrets.
- Provide an ExportOptions.plist whose method and team match.
flutter build ipa --release \
--export-options-plist=ios/ExportOptions.plistManage 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.