Flutter Project Build Issue #176745
-
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
|
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.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
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
cloud_firestoremodule. Point the command line tools to the current Xcode, clear DerivedData and pods, then rebuild so everything targets the iOS 18 simulator SDK.Open a terminal and run this exactly