Swift pods cannot yet be integrated as static libraries FirebaseCoreInternal-library
Solution 1
I rewrote my code like this:
target 'Runner' do
use_frameworks!
use_modular_headers!
pod 'Firebase/Analytics'
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end
Then I am doing cd ios
and pod install
and it works for me.
You can find more information here: https://firebase.google.com/docs/ios/setup#available-pods
You can also find a sample and open a project repository here:
https://firebase.google.com/docs/samples.
There you can view the config/Podfile
file and use it as an example.
Solution 2
You may not need to use use_frameworks!
or use_modular_headers!
because it's getting conflict with use_flipper
You can add the following without using them:
pod 'Firebase', :modular_headers => true
pod 'FirebaseCoreInternal', :modular_headers => true
pod 'GoogleUtilities', :modular_headers => true
#....add any library need headers
Best
Admin
Updated on January 04, 2023Comments
-
Admin over 1 year
I am building an app by Flutter. I got this error message when doing "
pod install
" or "pod install --repo-update
" or "pod update
" and the pod install failed and stopped.The error message:
[!] The following Swift pods cannot yet be integrated as static libraries:
The Swift pod
FirebaseCoreInternal-library
depends uponGoogleUtilities-library
, 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 setuse_modular_headers!
globally in your Podfile, or specify:modular_headers => true
for particular dependencies.My Podfile:
platform :ios, '11.0' ... target 'Runner' do use_frameworks! use_modular_headers! flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) end ...
-
Hubert Wang almost 2 yearsSame issue when I upgrade my Xcode and Firebase version. Got any idea to solve this issue? I am trying to use another method to import firebase (xcode package manager), not sure if it works or not.
-
Admin almost 2 yearsYou can try the steps below, they helped me
-