I’m unable to build my iOS app on EAS (using react-native) due to a CocoaPods integration error.
The build fails during the “Install pods” phase with the following message for multiple Firebase pods:
Here is the error message and the pod file
[!] The following Swift pods cannot yet be integrated as static libraries:
The Swift pod `FirebaseAuth` depends upon `FirebaseAuthInterop`, `FirebaseAppCheckInterop`, `FirebaseCore`, `FirebaseCoreExtension`, `GoogleUtilities`, and `RecaptchaInterop`, 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 set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
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.
The Swift pod `FirebaseCrashlytics` depends upon `FirebaseCore`, `FirebaseInstallations`, `GoogleDataTransport`, `GoogleUtilities`, and `nanopb`, 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 set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
The Swift pod `FirebaseSessions` depends upon `FirebaseCore`, `FirebaseCoreExtension`, `FirebaseInstallations`, `GoogleDataTransport`, `GoogleUtilities`, and `nanopb`, 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 set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
The Swift pod `FirebaseStorage` depends upon `FirebaseAppCheckInterop`, `FirebaseAuthInterop`, `FirebaseCore`, `FirebaseCoreExtension`, and `GoogleUtilities`, 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 set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
Error: Unknown error. See logs of the Install pods build phase for more information.```
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '13.4'
prepare_react_native_project!
use_frameworks! :linkage => :dynamic
target 'myapplication' do # changed
config = use_native_modules!
flags = get_default_flags()
use_react_native!(
:path => config[:reactNativePath],
:hermes_enabled => flags[:hermes_enabled],
:fabric_enabled => flags[:fabric_enabled],
:flipper_configuration => FlipperConfiguration.disabled,
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
target 'myapplicationtest' do # changed
inherit! :complete
end
post_install do |installer|
react_native_post_install(
installer,
config[:reactNativePath],
:mac_catalyst_enabled => false
)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
end
Here is my environment :
- Expo SDK: 53.0.22
- React Native: 0.79.5 (with Hermes enabled)
- @react-native-firebase/*: ~23.3.1
- EAS Build: iOS, clean build
What I’ve Tried
- Adding Forcing Dynamic Frameworks: use_frameworks! :linkage => :dynamic to my Podfile. The static library error persists.
- Added use_modular_headers! to my Podfile. This resolves the pod installation error but causes the build to fail later with the Hermes react_runtime redefinition error.
I don’t know what’s wrong with my configuration,
Can you have me solve the problem
- Adding Forcing Dynamic Frameworks: use_frameworks! :linkage => :dynamic to my Podfile. The static library error persists.
- Added use_modular_headers! to my Podfile. This resolves the pod installation error but causes the build to fail later with the Hermes react_runtime redefinition error.