Skip to content

[🐛] The following Swift pods cannot yet be integrated as static libraries [has workaround / Need Expo instructions to close this] #6332

Closed
@RodolfoGS

Description

@RodolfoGS

MAINTAINER UPDATE:

we have something that works below for expo users, see this comment: #6332 (comment)

this issue will be locked for discussion as it attracts people attempting to use or describe use of modular_headers which we must emphasize you cannot do, you will not be able to get support for build errors if you do that


Issue

pod install not working with the following error:

[!] The following Swift pods cannot yet be integrated as static libraries:

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.

How to reproduce

  1. expo init Test --npm
  2. Select "Bare workflow -> minimal"
  3. cd Test
  4. npm i @react-native-firebase/analytics @react-native-firebase/app
  5. cd ios
  6. pod install
  7. Error appears

If your prefer I created a repo: https://github.com/RodolfoGS/FirebaseCoreInternal-issue

  1. git clone git@github.com:RodolfoGS/FirebaseCoreInternal-issue.git
  2. cd FirebaseCoreInternal-issue/
  3. npm i
  4. cd ios
  5. pod install
  6. Error happens

This happens with all Firebase dependences, I tested with:

  • @react-native-firebase/analytics
  • @react-native-firebase/app
  • @react-native-firebase/crashlytics
  • @react-native-firebase/dynamic-links
  • @react-native-firebase/remote-config

Project Files

Javascript

Click To Expand

package.json:

{
  "name": "test",
  "version": "1.0.0",
  "main": "index.js",
  "scripts": {
    "start": "expo start --dev-client",
    "android": "expo run:android",
    "ios": "expo run:ios",
    "web": "expo start --web"
  },
  "dependencies": {
    "@react-native-firebase/analytics": "^15.0.0",
    "@react-native-firebase/app": "^15.0.0",
    "expo": "~45.0.0",
    "expo-splash-screen": "~0.15.1",
    "expo-status-bar": "~1.3.0",
    "react": "17.0.2",
    "react-dom": "17.0.2",
    "react-native": "0.68.2",
    "react-native-web": "0.17.7"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9"
  },
  "private": true
}

firebase.json for react-native-firebase v6:

# N/A

iOS

Click To Expand

ios/Podfile:

  • I'm not using Pods
  • I'm using Pods and my Podfile looks like:
# N/A

AppDelegate.m:

// N/A


Android

Click To Expand

Have you converted to AndroidX?

  • my application is an AndroidX application?
  • I am using android/gradle.settings jetifier=true for Android compatibility?
  • I am using the NPM package jetifier for react-native compatibility?

android/build.gradle:

// N/A

android/app/build.gradle:

// N/A

android/settings.gradle:

// N/A

MainApplication.java:

// N/A

AndroidManifest.xml:

<!-- N/A -->


Environment

Click To Expand

react-native info output:

 OUTPUT GOES HERE
  • Platform that you're experiencing the issue on:
    • iOS
    • Android
    • iOS but have not tested behavior on Android
    • Android but have not tested behavior on iOS
    • Both
  • react-native-firebase version you're using that has this issue:
    • 15.0.0
  • Firebase module(s) you're using that has the issue:
    • @react-native-firebase/analytics
  • Are you using TypeScript?
    • Y/N & VERSION


Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions