React Native Firebase Analytics: Undefined symbols for architecture x86_64

Stackoverflow post

I’m trying to build an iOS development build of my Expo project for an iOS simulator. I’m developing the app using the managed workflow with a custom development client.

My project depends on a suite of React Native Firebase libraries, including Firestore and Auth. Recently, I also added Analytics by executing expo install @react-native-firebase/analytics. When I tried to build the project with expo run:ios, I got the following error.

❌  Undefined symbols for architecture x86_64
┌─ Symbol: _OBJC_CLASS_$_FIRAnalytics
└─ Referenced from: objc-class-ref in RNFBAnalyticsModule.o

❌  ld: symbol(s) not found for architecture x86_64

❌  clang: error: linker command failed with exit code 1 (use -v to see invocation)

    Capabilities for Signing & Capabilities may not function correctly because its entitlements use a placeholder team ID. To resolve this, select a development team in the my_project_name editor. (in target 'my_project_name' from project 'my_project_name')

This is the link to the minimum, reproducible example on github. Please run expo run:ios after expo install.

  • Tried to clear caches by following instructions on expo doc.
  • Deleted the ios directory.
  • Manually installed pods by running pod install inside the ios directory.

None of the above solutions worked. Am I missing something here?

react-native-firebase requires that you enable use_frameworks! - you can enable this with expo-build-properties: BuildProperties - Expo Documentation

note that this may break other libraries, depending on whether they support this or not

Thank you for your response. expo-build-properties is installed and app.json plugin field is configured to put use_framework! to ios build. The error is observed regardless.

it looks like this pr suggests the expo-build-properties config that you need: docs(all): Update expo-build-properties instructions by thatzacdavis · Pull Request #6486 · invertase/react-native-firebase · GitHub

    "ios": {
      "useFrameworks": "static"
1 Like

I specified dynamic instead of static for useFrameworks, which was causing the problem. Thank you very much for your help, @brents . You saved my day!

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