Flutter Project Build Issue #176745
Replies: 2 comments
-
Short version: your toolchain is mismatched. You’re trying to run an iOS 18 simulator with Xcode 9.3—that can’t work. The “Module ‘cloud_firestore’ not found” is a side-effect of the wrong SDK/Pods build, not the real root cause. Fix (do these in order) Upgrade Xcode Install Xcode 16.x (required for iOS 18 simulators). xcode-select --switch /Applications/Xcode.app Open Xcode once → accept license → install iOS 18 simulators. Clean CocoaPods/Flutter artifacts rm -rf ios/Pods ios/Podfile.lock ios/Runner.xcworkspace Simplify your Podfile Remove use_modular_headers! (it often breaks Firebase imports). Prefer static frameworks (Firebase-friendly): target 'Runner' do Keep your platform :ios, '16.0' and your post_install block. Open the correct workspace & build for simulator Open ios/Runner.xcworkspace (not the .xcodeproj). Select an iOS 18 simulator (e.g., iPhone 16 Pro) and build. If you hit arch errors on Apple Silicon (only if needed) config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'arm64' Then pod install again. Verify package versions Make sure cloud_firestore is up to date and compatible with Flutter 3.35: flutter pub outdated cloud_firestore If you use Firebase, ensure your iOS setup is complete (GoogleService-Info.plist present, flutterfire configure if applicable). |
Beta Was this translation helpful? Give feedback.
-
The most likely fix is that the simulator build is still using Xcode 9.3 under the hood even if you installed newer tools. That produces pods compiled against the wrong SDK and the compiler cannot find the Open a terminal and run this exactly set -euo pipefail
xcode-select --switch /Applications/Xcode.app
xcodebuild -version
xcrun --sdk iphonesimulator --show-sdk-version
rm -rf ~/Library/Developer/Xcode/DerivedData
cd ios
rm -rf Pods Podfile.lock Runner.xcworkspace .symlinks
cd ..
flutter clean
flutter pub get
cd ios
pod repo update
pod install
cd ..
open ios/Runner.xcworkspace This switches the active Xcode, verifies versions, deletes stale build outputs, recreates Pods, and opens the correct workspace. After that, build for an iOS 18 simulator from Xcode. If it compiles and runs, the toolchain mismatch was the cause. If it still fails, regenerate the iOS project files so they match Flutter 3.35 templates, then re-add your Firebase plist and settings: flutter create .
cd ios
pod install
open Runner.xcworkspace If this solved your problem, please mark the answer as helpful so others can find it easily. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
🧩 Problem Description
I am attempting to build a project written with Flutter 3.35 (stable) for iOS 18, and run it using the iOS Simulator.
The Xcode build completes successfully, but the subsequent simulator build fails with the following error:
📁 Environment
📜 Podfile
🧠 What I’ve Tried
Ran
pod deintegrate && pod install
inside theios/
directoryCleaned the Flutter build:
Rebuilt pods using:
Verified that
cloud_firestore
is correctly declared inpubspec.yaml
🆘 Question
Could you please help identify:
📸 Screenshots
Beta Was this translation helpful? Give feedback.
All reactions