- SDK Version: 44.0.5
- Platforms(Android/iOS/web/all): iOS
In Expo managed app, after expo prebuild
. I got this error on pod install
or pod install --repo-update
or pod update
.
Error:
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.
...
platform :ios, '12.0'
require 'json'
podfile_properties = JSON.parse(File.read('./Podfile.properties.json')) rescue {}
target 'AppName' do
use_expo_modules!
config = use_native_modules!
use_react_native!(
:path => config[:reactNativePath],
:hermes_enabled => podfile_properties['expo.jsEngine'] == 'hermes'
)
...
I found an answer to add following lines in Podfile
pod 'Firebase', :modular_headers => true
pod 'FirebaseCoreInternal', :modular_headers => true
pod 'GoogleUtilities', :modular_headers => true
#....add any library need headers
As suggested by Expo official docs I want to know how we can add the above modules safely using @expo/config-plugins
. withPodfileProperties