Key takeaways
- Read the first error: line of flutter build ios -v, not the final "Xcode build failed" summary, then match it to CocoaPods resolution, deployment target, plugin versions or signing.
- Firebase's installation docs say its CocoaPods distribution requires Xcode 26.2 and CocoaPods 1.12.0 or higher, and its Swift Package Manager support needs Xcode 26.2 or higher.
- FlutterFire plugins need iOS 15 or later, so the Podfile platform line, the Xcode Minimum Deployments setting and any post_install override should agree.
- Firebase Apple SDK 13.0.0 (October 7, 2026) is distributed only through Swift Package Manager and binary downloads. Firebase 12 is the final major version published to CocoaPods.
- Flutter turned Swift Package Manager on by default in 3.44 and falls back to CocoaPods for plugins that don't support it. The CocoaPods registry becomes read-only on December 2, 2026.
- Deleting Pods and Podfile.lock is safe for a repair, but pods may resolve to newer versions, so review the new Podfile.lock and commit it once the build passes.
Pricing an app? Try the free app cost calculator or get a range for your project in the instant quote.
When a Flutter iOS build breaks right after an upgrade, the cause is almost always one of four things: a stale CocoaPods lock, a deployment target that is too low, FlutterFire plugins on mismatched versions, or an Xcode that no longer matches the SDKs you depend on. The error Xcode shows first is rarely the real one. This guide is the order to work in, from reading the actual failure to the fixes that cover most upgrade breakages.
It is the same approach Simon uses on Workspace369, his production Flutter and Firebase SaaS, and it is the iOS build part of App369’s fixed-price Flutter & Firebase Fix Ticket. For the wider method, see how to debug a Flutter and Firebase bug.
Step 1: Read the real error
Don’t start by deleting folders. First get the full output.
- Run
flutter doctor -vand fix anything it flags under Xcode or CocoaPods. - Run
flutter build ios -v(orflutter run -v) and read from the first line that sayserror:, not the last line. The final “Xcode build failed” message is a summary. - If the failure happens in Xcode itself, open
ios/Runner.xcworkspace(neverRunner.xcodeproj) and use the Report navigator to open the build log. Filter for errors and read the first one.
Where the error appears tells you which step failed:
| Where it fails | Likely area |
|---|---|
pod install output, before compiling | CocoaPods resolution, Podfile, specs |
| “Compiling for iOS X, but module requires iOS Y” | Deployment target too low |
| Swift or Objective-C compile errors inside a plugin | Plugin and Xcode or SDK version mismatch |
| Linking or “framework not found” | Stale Pods or build cache |
| Code signing messages | Signing and provisioning, covered at the end |
Step 2: Check your Xcode and CocoaPods versions
Upgrades often fail because the Firebase SDK moved its minimum requirements. The Firebase Apple platforms installation docs say Firebase’s CocoaPods distribution requires Xcode 26.2 and CocoaPods 1.12.0 or higher, and that Swift Package Manager support also requires Xcode 26.2 or higher. Check yours with pod --version and xcodebuild -version, and update if either is below what your plugins need. Flutter’s own iOS setup page covers pointing the command-line tools at the right Xcode (xcode-select) and accepting licenses (sudo xcodebuild -license); a second Xcode installed on the machine is a common reason a build uses the wrong toolchain.
Step 3: Fix the iOS deployment target
A plugin upgrade can raise the minimum iOS version. The Firebase Flutter setup page lists iOS 15 or later as the Apple requirement for the FlutterFire plugins. Check three places and make them agree:
ios/Podfile: the lineplatform :ios, '15.0'(use the minimum your plugins ask for; if the line is commented out, uncomment it).- Xcode: Runner target, General tab, “Minimum Deployments”.
- The
post_installblock in the Podfile, if you have one that setsIPHONEOS_DEPLOYMENT_TARGETon every pod. A value there that is lower than a pod’s own minimum produces the “module requires iOS Y” error.
Step 4: Refresh CocoaPods, then clean it out
Work from least to most destructive. Run these inside the ios folder. For a quick checklist when the build stops at pod install, see Flutter pod install failed: the fix.
pod install --repo-updaterefreshes the local spec repository and then installs. Use it whenpod installsays it can’t find a version that an upgraded plugin needs, because it refreshes CocoaPods’ local spec data before resolving.pod update PODNAMEif one pod needs to move to a newer version thanPodfile.lockallows. As the CocoaPods guide explains,pod installrespects the versions inPodfile.lock, whilepod updateignores the lock and fetches the newest version your constraints allow.- A clean reinstall. If it is still broken, remove the generated pieces and rebuild them:
cd ios
rm -rf Pods Podfile.lock
cd ..
flutter clean
flutter pub get
cd ios && pod install --repo-update
Deleting Pods is safe because it is generated. Deleting Podfile.lock is also safe for a one-off repair, but it lets every pod re-resolve, so you may get newer versions than before. The CocoaPods guide recommends committing Podfile.lock, so review the diff after the reinstall and commit the new one once the build passes. If you only suspect Xcode’s cache, you can also delete ~/Library/Developer/Xcode/DerivedData; it only holds build products, and Xcode recreates it.
Step 5: Upgrade the FlutterFire plugins together
firebase_core, cloud_firestore, firebase_auth and the other FlutterFire plugins are versioned together and each one depends on a specific Firebase SDK release. Upgrading one and leaving the others behind is a common source of build errors, including duplicate or conflicting native pods.
- Run
flutter pub outdatedto see the gap, then upgrade the whole FlutterFire family in onepubspec.yamlchange. - Re-run
flutterfire configureif you added a Firebase service or platform; the Firebase docs say re-running it keeps your configuration current. Install the tool withdart pub global activate flutterfire_cli. - If you pin a Firebase SDK version in the Podfile, remove the pin and let the plugins choose it. A manual pin that disagrees with
firebase_coreis a classic conflict.
Step 6: Know that CocoaPods is being phased out
This matters for upgrades in late 2026. Firebase’s CocoaPods deprecation page says Firebase stops publishing new versions to CocoaPods in October 2026 and that Firebase 12 is the final major version published there. Firebase Apple SDK 13.0.0, released October 7, 2026, is distributed only through Swift Package Manager and binary downloads, per the Firebase iOS release notes. Flutter’s Swift Package Manager page says SwiftPM support is on by default as of Flutter 3.44, that Flutter falls back to CocoaPods for plugins that don’t support it yet, and that the CocoaPods registry becomes read-only on December 2, 2026. Existing apps and CI that run pod install keep working; they just stop receiving new Firebase releases.
In practice: after a Flutter upgrade, the first build may modify your Xcode project to add SwiftPM integration. Commit that change rather than reverting it, and if a build error mentions a Swift package, read it the same way as a pod error: find the first real failure. FlutterFire’s October 15, 2026 release (Flutter BoM 5.0.0) lists Apple SDK 13.0.0 alongside 12.19.0, the last CocoaPods line, so which one your app gets depends on the dependency manager Flutter uses for it.
SwiftPM errors after the upgrade
If the first build after upgrading fails and mentions a Swift package, check three things.
- Platform version. Flutter’s SwiftPM page gives this example:
requires minimum platform version 14.0 for the iOS platform, but this target supports 12.0. Raise Minimum Deployments for the Runner target, then runflutter build ios --config-onlyto regenerate the plugin package. - Xcode version. Firebase lists Xcode 26.2 as the minimum for its Swift Package Manager support, so Firebase 13 won’t resolve in an older Xcode.
- The Runner scheme. Flutter’s SwiftPM migration adds a “Run Prepare Flutter Framework Script” pre-action to the Runner scheme and makes
FlutterGeneratedPluginSwiftPackagea target dependency. If either is missing, compare your scheme andios/Runner.xcodeproj/project.pbxprojwith Flutter’s page.
If a plugin doesn’t support SwiftPM yet, Flutter falls back to CocoaPods for it, so a pod install error can still appear on an app that is otherwise migrated. If you build with Xcode 27, also check the UIScene migration, a separate launch-time requirement.
Step 7: Signing errors, briefly
If it compiles but fails to archive, it is usually signing. In Xcode, open the Runner target, Signing & Capabilities, and check that a team is selected, the bundle identifier matches your App Store Connect app, and “Automatically manage signing” is on unless you manage profiles yourself. Flutter’s iOS setup page notes a signed developer certificate is needed even for device testing.
When to get help
If an iOS build has eaten more than a day and the steps above haven’t moved it, App369’s fixed-price Flutter & Firebase Fix Ticket covers build failures after a Flutter or FlutterFire upgrade. The $450 Diagnosis delivers the root cause with evidence and a fixed repair quote within 3 business days, and the $450 is credited toward the fix. The $1,200 Fix delivers the scoped defect as a pull request with a regression test within 5 business days. App Store approval isn’t something anyone can guarantee; the ticket covers the code defect itself.
Want this done at a fixed price?
Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.
Frequently asked questions
- Why did my Flutter iOS build fail after upgrading Flutter?
- Most often the iOS deployment target is too low, Podfile.lock pins old pod versions, or FlutterFire plugin versions no longer match each other. Run flutter build ios -v, find the first error: line, then check the deployment target and run pod install.
- Is it safe to delete Podfile.lock and the Pods folder?
- Yes, for a repair. Pods is generated and pod install rebuilds Podfile.lock. The catch is that pods may resolve to newer versions, so review the new lock file and commit it once the build works.
- What does pod install --repo-update do?
- It refreshes CocoaPods' local spec data before installing. Use it when pod install can't find a pod version that a newly upgraded plugin needs.
- Should I upgrade only one FlutterFire plugin?
- Avoid it. FlutterFire plugins depend on matching Firebase SDK releases, so upgrade firebase_core and the other FlutterFire packages together and rebuild.
- Does Firebase still publish to CocoaPods?
- Not for new major versions. Firebase says Firebase 12 is the final major version published to CocoaPods, and Firebase Apple SDK 13.0.0 (October 7, 2026) is distributed through Swift Package Manager and binary downloads only.
- Do I need to switch from CocoaPods to Swift Package Manager?
- Flutter handles the switch from version 3.44 and falls back to CocoaPods for plugins that don't support Swift Package Manager yet. Keep your FlutterFire plugins current, because apps that stay on CocoaPods stop receiving new Firebase releases.
- What Xcode version does Firebase need now?
- Firebase's Apple installation docs list Xcode 26.2 for both its CocoaPods distribution and its Swift Package Manager support, plus CocoaPods 1.12.0 or higher for CocoaPods.
Sources
- Firebase docs, Install Firebase Apple SDKs
- Firebase docs, CocoaPods deprecation
- Firebase docs, Add Firebase to your Flutter app
- Firebase SDK for Flutter release notes (Flutter BoM 5.0.0, October 15, 2026)
- Firebase Apple SDK release notes (13.0.0, October 7, 2026)
- Flutter docs, Swift Package Manager for app developers
- Flutter docs, Set up iOS development
- CocoaPods guides, pod install vs. pod update