The Swift pod FirebaseAuth depends upon FirebaseAppCheckInterop, FirebaseCoreExtension,…
- User
The Swift pod
FirebaseAuthdepends uponFirebaseAppCheckInterop,FirebaseCoreExtension, andRecaptchaInterop, which do not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may setuse_modular_headers!globally in your Podfile, or specify:modular_headers => truefor particular dependencies.The Swift pod
FirebaseFirestoredepends uponFirebaseCoreExtensionandFirebaseFirestoreInternal, which do not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may setuse_modular_headers!globally in your Podfile, or specify:modular_headers => truefor particular dependencies.The Swift pod
FirebaseStoragedepends uponFirebaseAppCheckInteropandFirebaseCoreExtension, which do not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may setuse_modular_headers!globally in your Podfile, or specify:modular_headers => truefor particular dependencies. Assistant
You're encountering CocoaPods warnings related to module maps for certain Firebase dependencies when integrating them into a Swift project. These warnings appear because:
- You're using Swift and importing Objective-C static libraries that don't define modular headers, which are required for proper module imports in Swift.
- The pods (
FirebaseAuth,FirebaseFirestore,FirebaseStorage) depend on internal Firebase pods likeFirebaseAppCheckInterop,FirebaseCoreExtension, etc., which do not generate module maps by default.
✅ Solution
To resolve these warnings, you need to enable modular headers for those dependencies.
You have two options:
✅ Option 1: Enable Modular Headers Globally (Recommended for Simplicity)
Add this line at the top of your Podfile, before any
poddeclarations:use_modular_headers!This will enable modular headers for all pods, resolving the issue across your entire project.
Example Podfile snippet:
platform :ios, '13.0' use_modular_headers! target 'YourApp' do pod 'Firebase/Auth' pod 'Firebase/Firestore' pod 'Firebase/Storage' end✅ This is usually the easiest and safest way unless you have specific reasons to control modular headers per-pod.
✅ Option 2: Enable Modular Headers Per Dependency (Granular Control)
If you prefer more control or want to minimize potential issues from enabling modular headers globally, you can specify it per dependency:
pod 'FirebaseAppCheckInterop', :modular_headers => true pod 'FirebaseCoreExtension', :modular_headers => true pod 'RecaptchaInterop', :modular_headers => true pod 'FirebaseFirestoreInternal', :modular_headers => trueBut since these are transitive dependencies of Firebase pods, you'd need to use a
post_installhook in your Podfile to patch them after resolution.Here's how:
post_install do |installer| installer.pods_project.targets.each do |target| if [ 'FirebaseAppCheckInterop', 'FirebaseCoreExtension', 'RecaptchaInterop', 'FirebaseFirestoreInternal' ].include?(target.name) target.build_configurations.each do |config| config.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES' config.build_settings['ENABLE_MODULAR_HEADERS'] = 'YES' end end end end⚠️ This method is more complex and generally only needed in advanced scenarios.
🛠️ Final Steps After Modifying Podfile
After updating your Podfile:
-
Run:
cd ios && pod install --repo-updateor
cd ios && pod update -
Clean build folder in Xcode:
- Product > Clean Build Folder (or press
Shift + Command + K)
- Product > Clean Build Folder (or press
-
Rebuild your app.
📝 Summary
Approach When to Use use_modular_headers!globallyEasiest and most common solution for Firebase projects Specify :modular_headers => trueper podIf you want granular control Modify build settings via post_installFor advanced cases with transitive dependencies Let me know if you're using Flutter, React Native, or SwiftUI — I can tailor the answer further!
- User
getting above in reactnaitbe IOS
Assistant
Great! Since you're using React Native for iOS and seeing Firebase-related warnings like:
The Swift pod `FirebaseAuth` depends upon `FirebaseAppCheckInterop`, `FirebaseCoreExtension`, and `RecaptchaInterop`, which do not define modules.This is a common issue when integrating Firebase into React Native iOS projects via CocoaPods.
✅ TL;DR – Quick Fix
Add this line to the top of your
ios/Podfile:use_modular_headers!Then run:
cd ios && pod install --repo-updateThat’s usually enough to silence the warnings and allow proper Swift/Objective-C interoperability with Firebase.
🧠 Why This Happens in React Native
- React Native uses Objective-C under the hood.
- Firebase pods (like
FirebaseAuth,FirebaseFirestore) are written in Swift, and they depend on internal Objective-C libraries that don’t generate module maps by default. - When building as static libraries, Swift needs module maps to import Objective-C dependencies — hence the warning.
- React Native doesn't use modular headers by default, so you need to opt-in.
✅ Full Step-by-Step Solution
1. Update Your Podfile
Open
ios/Podfileand adduse_modular_headers!at the top, just below the platform declaration:platform :ios, '13.0' use_modular_headers! target 'YourApp' do config = use_native_modules! use_react_native!(path: "../../node_modules/react-native") pod 'Firebase/Core' pod 'Firebase/Auth' pod 'Firebase/Firestore' pod 'Firebase/Storage' # Add any other Firebase services you're using endReplace
'YourApp'with your actual target name.
2. Reinstall Pods
Run these commands inside the
ios/folder:cd ios rm -rf Pods/ Podfile.lock build DerivedData pod cache clean --all pod install --repo-updateThis ensures all pods are cleanly reinstalled with the new settings.
3. Clean & Rebuild in Xcode
- Open your project in Xcode (
ios/YourApp.xcworkspace) - Go to Product > Clean Build Folder (
Shift + Command + K) - Then Product > Build (
Command + B)
🔍 Optional – Use Modular Headers Only Where Needed
If you want more control (e.g., avoid enabling modular headers globally), you can apply it only to Firebase dependencies:
pod 'FirebaseAppCheckInterop', :modular_headers => true pod 'FirebaseCoreExtension', :modular_headers => true pod 'RecaptchaInterop', :modular_headers => true pod 'FirebaseFirestoreInternal', :modular_headers => trueBut since those are transitive dependencies, it's often easier to stick with
use_modular_headers!.
📌 Notes for React Native Firebase Users
If you're using
@react-native-firebase/app, make sure you've followed their setup instructions correctly:- Installed pods via
Podfile - Added the Google Services plist file
- Enabled appropriate background modes if needed
- Linked properly (RN < 0.60 may require manual linking)
✅ Final Result
After applying the fix:
- Warnings about missing module maps should go away
- Firebase should compile and work correctly in your React Native iOS app
Let me know if you’re using Expo, EAS, or have a specific version of React Native or Firebase — I can tailor the solution even further!
- User
[!] CocoaPods could not find compatible versions for pod "FirebaseAuthInterop": In Podfile: FirebaseAuth was resolved to 11.13.0, which depends on FirebaseAuthInterop (~> 11.0)
Specs satisfying the
FirebaseAuthInterop (~> 11.0)dependency were found, but they required a higher minimum deployment target. Assistant
You're encountering this CocoaPods error:
[!] CocoaPods could not find compatible versions for pod "FirebaseAuthInterop": In Podfile: FirebaseAuth was resolved to 11.13.0, which depends on FirebaseAuthInterop (~> 11.0) Specs satisfying the `FirebaseAuthInterop (~> 11.0)` dependency were found, but they required a higher minimum deployment target.
🔍 What’s Happening?
This means:
- You're trying to install Firebase Auth version
11.13.0, which requiresFirebaseAuthInteropversion~> 11.0. - The required
FirebaseAuthInteropexists in the CocoaPods repo, but it only supports iOS versions higher than what you have set in your project.
In short:
👉 Your app's minimum iOS deployment target is too low for Firebase 11.x.
✅ Solution
📱 Step 1: Increase Your Deployment Target
Open your
ios/Podfile, and make sure your platform line is at least:platform :ios, '14.0'Firebase 11 dropped support for iOS 12 and below. So, if your current setting is
'13.0'or lower, change it to at least'14.0'.Example:
platform :ios, '14.0' use_modular_headers! target 'MyApp' do config = use_native_modules! use_react_native!(path: "../node_modules/react-native") # Firebase pods pod 'Firebase/Core' pod 'Firebase/Auth' pod 'Firebase/Firestore' ... end💡 You can go higher (like
'15.0') if needed — just ensure all your dependencies are compatible.
🧹 Step 2: Clean Pods & Reinstall
Run these commands inside the
ios/folder:cd ios rm -rf Pods/ Podfile.lock build DerivedData pod cache clean --all pod repo update pod install
🛠️ Optional: Update Xcode Project Settings
Also, double-check that your Xcode project settings match the new minimum deployment target:
- Open
ios/YourApp.xcworkspacein Xcode. - Go to your main app target.
- Under General > Deployment Info, set iOS Deployment Target to
14.0or higher.
📌 Why This Works
Firebase 11+ now requires iOS 14+ as a minimum because of updated dependencies and modern Swift/Objective-C tooling.
If you must support iOS 13 or earlier, you'll need to pin Firebase to an older version (e.g.,
10.x.x), though this is not recommended due to potential security and compatibility issues.
🔁 Downgrading Firebase (Alternative)
If you must support iOS 13 or lower, try downgrading Firebase to version
10.x:Update your Podfile:
pod 'Firebase', '~> 10.0' pod 'Firebase/Auth', '~> 10.0' pod 'Firebase/Firestore', '~> 10.0'Then run:
cd ios && pod install --repo-updateBut again, this is not ideal long-term.
✅ Final Checklist
Task Status Set platform :ios, '14.0'in Podfile✅ Ran pod install --repo-updateafter changes✅ Set iOS Deployment Target in Xcode to ≥14.0 ✅
Let me know your React Native version and exact Firebase setup, and I can give even more tailored steps!
- You're trying to install Firebase Auth version
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.