7

I am making a React-Native mobile application and want to incorporate Firebase and Firebase Authentication. However, I am facing this error when I run 'pod install' or 'pod update':

enter image description here

I did some research and found out that this issue has not yet been resolved by Google (https://issuetracker.google.com/issues/254418199), but I came across a workaround (https://github.com/firebase/firebase-ios-sdk/issues/10359) which said to add a version specifier to the Podfile: pod 'FirebaseAuth', '>= 9.6.0'. However, even after I added the line into the Podfile in my iOS folder, the same error still persists. May I know if I'm doing something wrongly?

4 Answers 4

23

I stumbled upon the same issue. It seems it's a compatibility issue with the latest Firesbase SDK version (10).

For now something that worked for me is to place this at the top of the Podfile:

$FirebaseSDKVersion = '9.6.0' (Docs)

This overrides the default firebase sdk and assures it uses the downgraded version.

Now just execute pod install and give a try. If it doesn't work try removing the Podfile.lock and the Pods folder and try again.

BTW I didn't need this line in the Podfile as one of the resources you shared mentioned:

pod 'FirebaseAuth', '>= 9.6.0'

5
  • Thank you, it works! :) But now my build fails when I run on the iOS simulator: The following build commands failed:CompileC Library/Developer/Xcode/DerivedData/Chatbot-eeojnmlkiuetmccwazfgajbalxbi/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNFBFirestore.build/Objects-normal/arm64/RNFBFirestoreCollectionModule.o /Users/xxx/Chatbot/node_modules/@react-native-firebase/firestore/ios/RNFBFirestore/RNFBFirestoreCollectionModule.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target 'RNFBFirestore' from project 'Pods') (1 failure) Any tips? Nov 4, 2022 at 8:15
  • I also got a similar error (although I'm not quite sure if it's the same). I solved it following this answer: stackoverflow.com/a/62981498/5627152 Surprisingly uninstalling all my firebase dependencies and then installing them again worked like a charm. Give a try! I hope this also works for you. Nov 4, 2022 at 15:35
  • I am currently using "@react-native-firebase/app": "17.0.0", for this also should i add $FirebaseSDKVersion = '9.6.0' in pod file ? what does this mean actually ?
    – Sadanand
    Feb 10 at 4:10
  • 2
    @Sadanand "@react-native-firebase/app": "17.0.0" is what you have in your package.json. That's your npm package version. Behind the scenes a native package is installed which is FirebaseSDK (and the version differs from the the one in npm). The thing is that if you don't specify a version in your podfile then it will install the latest version (10.X.X) which is the one that has the compatibility issues. In order for you to avoid those compatiblity issues you need to specify $FirebaseSDKVersion = '9.6.0' in the podfile which is a version that doesn't have this issue. Feb 14 at 1:38
  • Worked like a charm with $FirebaseSDKVersion = '9.6.0'. Using "@react-native-firebase/auth": "^17.3.1" and "@react-native-google-signin/google-signin": "^9.0.2" in package.json. I also tried using $FirebaseSDKVersion = '10.5.0' but did not work.
    – NoNam4
    Feb 24 at 18:56
1

What helped me is to add this into my pod file.

pod 'GTMSessionFetcher', :modular_headers => true

and then run

arch -x86_64 pod update GTMSessionFetcher/Core
0

Unfortunately, while Alex's answer did help with my original error, I was unable to solve the 2nd error in my comment above. What I did instead was to restart the creation of the app. This time, however, rather than connecting the app to Dialogflow first, I linked the app to Firebase Auth first, and then adding Dialogflow. This worked for me and I managed to build the app with no issues. Hope this helps someone.

0

try to delete Podfile.lock and run cd ios && pod install --repo-update

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.