I'm trying to build my Flutter app for iOS, and the process is failing due to a CocoaPods dependency conflict involving GoogleUtilities/Environment. It seems different Firebase packages are requesting incompatible versions of this pod.
🔧 My Dependencies
pubspec.yaml (relevant)
firebase_core: 2.32.0firebase_messaging: 14.9.4google_sign_in: 6.1.5
❌ Error from pod install
[!] CocoaPods could not find compatible versions for pod "GoogleUtilities/Environment":In Podfile:firebase_core (2.32.0) -> Firebase/CoreOnly (= 10.25.0) ->FirebaseCore (= 10.25.0) -> GoogleUtilities/Environment (~> 7.12)
firebase_core (2.32.0) -> FirebaseCore -> GoogleUtilities/Logger (~> 7.12) -> GoogleUtilities/Environment (= 7.13.3)firebase_messaging (14.9.4) -> Firebase/Messaging (= 10.25.0) -> FirebaseMessaging -> GoogleDataTransport (~> 9.3) -> GoogleUtilities/Environment (~> 7.7)firebase_messaging (14.9.4) -> FirebaseMessaging -> GoogleUtilities/Environment (~> 7.8)google_sign_in_ios -> GoogleSignIn (~> 8.0) -> AppCheckCore (~> 11.0) -> GoogleUtilities/Environment (~> 8.0)
Has anyone found a compatible set of plugin versions for Firebase that avoids this conflict on iOS?
Is there a recommended way to resolve version mismatches for GoogleUtilities/Environment when multiple Firebase plugins are involved?
Thanks in advance for any help! 🙏
I ran flutter clean followed by flutter pub get to reset the build environment.
I downgraded firebase_messaging to earlier versions like 14.9.1 and 14.9.0 to see if they depended on compatible pod versions.
I ran flutterfire configure to regenerate my Firebase iOS setup and ensure it's using the correct versions.
I manually checked the Firebase iOS SDK versions and their transitive CocoaPods dependencies to identify where the conflict is.
I tried letting pod install resolve automatically without a Podfile.lock but still got the same error.
I expected flutter build ios (or pod install) to complete successfully and resolve all Firebase-related pod dependencies, so I could proceed with building and running the app on an iOS simulator or device.