Flutter
Start with doctor
Transfer the project, dependency lockfiles and required assets to the Mac. Use the Flutter version already specified by the project. Rule out environment issues before changing application code.
Install the prerequisites
Set up the Flutter SDK, full Xcode and CocoaPods. If the project specifies a Flutter version or Ruby toolchain, follow the repository's requirements to avoid using different versions locally and on the build machine.
Run diagnostics, then address iOS toolchain warnings one by one. A device connection warning may not block archiving, but missing Xcode, SDKs or signing configuration must be fixed first.
Know the difference between the two checks
To check whether the code compiles, start with a release build without signing. This won't produce a signed installable app or a package ready for distribution.
To export an .ipa, check the Team, Bundle Identifier, certificate and provisioning profile in Xcode's Signing & Capabilities, then run the production build.
Run these in order
flutter --version
flutter doctor -v
flutter pub get
flutter build ios --release --no-codesign
flutter build ipa --release
The final command requires complete signing configuration. The output location and export method depend on your Flutter version and command output. When it's done, download the build and verify it locally.
| Error clue | What to check first | What not to do first |
|---|---|---|
| CocoaPods not installed | Check that CocoaPods is installed and that the current terminal can find the pod command. | Don't delete the entire iOS project first. |
| No profiles / signing | Check that the Bundle Identifier, Team and export type match, and verify that the provisioning profile is valid. | Don't treat dependency errors and signing errors as the same problem. |
| Deployment target | Check plugin requirements, align the minimum iOS version in the project and Podfile, then install dependencies. | Don't change just one target and immediately retry archiving. |