I am using eas build for my expo-based react native app. I am unable to build for ios and keep getting the error during Install pods with the following error log:
106 [!] The following Swift pods cannot yet be integrated as static libraries:
107 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.
108 Error: Unknown error. See logs for more information.
I have searched many stackoverflow related questions which I have used in editing the Podfile at node_modules/react-native/template/ios/Podfile. An excerpt of the Podfile is shown below:
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '12.4'
install! 'cocoapods', :deterministic_uuids => false
# added only these 5 lines to the Podfile
use_frameworks! :linkage => :static
pod 'Firebase', :modular_headers => true
pod 'FirebaseCoreInternal', :modular_headers => true
pod 'GoogleUtilities', :modular_headers => true
use_modular_headers!
target 'HelloWorld' do
config = use_native_modules!
# Flags change depending on the env values.
flags = get_default_flags()
...
Questions:
Are the added 5 lines in the appropriate place in the code? I have tried adding them just below the
Do I have to edit code elsewhere apart from the Podfile? If yes, where and what code.
Been battling this for up to 2 weeks now. Any help would be most welcome.
Thanks