Hola hola,
I ran into the following error after running npx pod-install
while using React Native Firebase(v15.2.0) and React Native v0.69.3:
[!] The following Swift pods cannot yet be integrated as static libraries:
The Swift pod `FirebaseCoreInternal` depends upon `GoogleUtilities`, which does 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 set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
After adding just pod 'GoogleUtilities', :modular_headers => true
the above was solved. Then, I had many similar errors with other RNFirebase modules such as FirebaseStorage
, FirebaseFunctions
, etc.
As many devs do, I added the first line into Google: The following Swift pods cannot yet be integrated as static libraries:
and found answers for non RNFirebase libraries.
I didn't see any react-native-firebase issues so I went to their repo and found this message which leads to a StackOverflow answer.
For me, the above error was solved by adding the following to my Podfile caused there to be no issues for any RNFirebase module:
pod 'Firebase', :modular_headers => true
pod 'FirebaseCore', :modular_headers => true
pod 'FirebaseCoreInternal', :modular_headers => true
pod 'FirebaseStorageInternal', :modular_headers => true
pod 'FirebaseCoreExtension', :modular_headers => true
pod 'FirebaseAppCheckInterop', :modular_headers => true
pod 'FirebaseAuthInterop', :modular_headers => true
pod 'FirebaseMessagingInterop', :modular_headers => true
pod 'GTMSessionFetcher', :modular_headers => true
pod 'FirebaseAppCheckInterop', :modular_headers => true
pod 'FirebaseAuthInterop', :modular_headers => true
pod 'GoogleUtilities', :modular_headers => true
Hopefully this increases visibility for others.
I've been working with React Native for the last 4 years and will continue documenting common React Native errors that we come across at TroutHouseTech.
-Matt
Top comments (4)
This is really helpful. Thanks!
Very cool! Thanks for reading
I have the same mistake. But I use Expo. What should I do in this case?
did you find any solutions for expo ?