firebase-ios-sdk: React Native iOS & Native iOS Analytics Build Failure

Step 1: Describe your environment

  • Xcode version: 12.3
  • Firebase SDK version: on iOS whatever the version is here; for @react-native-firebase/app & @react-native-firebase/analytics it’s 10.8.0
  • Installation method: CocoaPods
  • Firebase Component: Analytics

Step 2: Describe the problem

I am a React Native developer utilizing @react-native-firebase, specifically for Analytics, and have successfully integrated it in Android, however have been unable to do so due to some strange errors on iOS. The problem is detailed here, there is a React Native example here.

Steps to reproduce:

1.) For React Native, run the install script: yarn install && cd ios && pod install && cd .. && npm run ios. You’ll get this error:

▸ Touching RNFBApp.framework (in target 'RNFBApp' from project 'Pods')
▸ Processing RNFBAnalytics-Info.plist
▸ Linking RNFBAnalytics

❌  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)

2.) When I utilized the iOS Analytics quickstart with use_frameworks! via XCode I got this error:

error

You can see my iOS repo here.

The conversation I had on the React Native repo revolved around use_frameworks, as you can see here.

Relevant Code:

In /ios/Podfile

use_frameworks!

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (9 by maintainers)

Most upvoted comments

Hello firebase-ios-sdk folks, I was the working with @SaraChicaD in the react-native-firebase repo on this, and I’m just catching up with the investigation over here. My goal there was to generate reproducible examples and it appeared that we had a reproducible failure using nothing but the firebase-ios-sdk ios quickstart though I did not personally attempt reproduction, so I thought it best to continue here.

May be that the issue reproducing with firebase-ios-sdk analytics quickstart was use of .xcodeproj vs .xcodeworkspace as it appears @paulb777 runs the quickstart fine

Continuing on the assumption that’s correct and firebase-ios-sdk quickstart is fine, then I think yes, it goes back to react-native-firebase for reproduction. We had a mostly scripted repro based on it so we should be able to hunt this down. It appears it’s time for me to actually attempt the reproduction myself to see what’s going on!

The issues are all cross-linked so I won’t forget to report back after checking it out

@mikehardy Thanks for the update. I’ll close this issue, but feel free to add more comments if there’s anything else for here.

After a lot of messing with the project, I haven’t reached any meaningful conclusions. I was able to get a different linker error by running npm audit fix --force at the root, and it looks like based on my searches on StackOverflow others were able to resolve those errors by clearing various build caches.