Swift pod `FirebaseCoreInternal` depends upon `GoogleUtilities`, which does not define modules

  1. SDK Version: 44.0.5
  2. 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.

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
  config = use_native_modules!

    :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

Hi @thakurballary, you might want to follow the steps from the following blog post for using Firebase with Expo and Firebase and expo-config plugins.

Also, expo prebuild command is equivalent to ejecting or detaching from Expo’s managed workflow.

Hi @amanhimself , here is the link to exact same issue https://github.com/invertase/react-native-firebase/issues/6332

This issue needs help from the Expo community.

Below is the screenshot from https://rnfirebase.io/#3-ios-setup

1 Like

this is the comment on that thread that fixed it for me: [🐛] The following Swift pods cannot yet be integrated as static libraries [has workaround / Need Expo instructions to close this] · Issue #6332 · invertase/react-native-firebase · GitHub

1 Like

Thanks @playup for linking that here. @thakurballary, I think this requires an update to rnfirebase docs to point towards using expo-build-properties config plugin with the latest SDK. I will see what I can do to submit a PR to improve that message.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.