4

I am trying to do pod install but it says error like:

No podspec found for RNFBAnalytics in ../node_modules/@react-native-firebase/analytics

I found a solution that says yarn add @react-native-firebase/analytics && cd ios && pod install --repo-update and it eliminates above error and shows another similar error like:

[!] No podspec found for RNFBCrashlytics in ../node_modules/@react-native-firebase/crashlytics

Again, fixed with a similar method yarn add @react-native-firebase/crashlytics&& cd ios && pod install --repo-update

Afterwards, it shows:

[!] No podspec found for react-native-fbsdk in ../node_modules/react-native-fbsdk

This time also, I did yarn add react-native-fbsdk&& cd ios && pod install --repo-update

And finally it shows:

[!] CocoaPods could not find compatible versions for pod "FirebaseCoreExtension": In Podfile: RNFBCrashlytics (from ../node_modules/@react-native-firebase/crashlytics) was resolved to 15.3.0, which depends on FirebaseCoreExtension (= 8.12.1) None of your spec sources contain a spec satisfying the dependency: FirebaseCoreExtension (= 8.12.1). You have either:

  • out-of-date source repos which you can update with pod repo update or with pod install --repo-update.
  • mistyped the name or version.
  • not added the source repo that hosts the Podspec to your Podfile.

From the error, I would like to know several things:

What is FirebaseCoreExtension?

Is it an npm package? ( I don't think so).

How can I fix the error?

I have been looking for solutions by searching for similar cases but they don't give me any clear and correct answer. I deleted Podfile.lock and reinstall Pods by pod install. Also deleted node_modules and reinstalled it by yarn install. And I tried: pod deintegrate pod install pod update but no luck yet. FYI, I experience this issue after I migrate the project from for Xcode 12 to Xcode13.

Can anyone help?

Don't hesitate to leave any comment and I can upvote any answer that helps even a bit.

Thank you!

VecopWall
  • 549
  • 1
  • 7
  • 23

4 Answers4

2

by updating the @react-native-firebase/app fixed this issue for me

"yarn add @react-native-firebase/app"
Ebrahim Sayed
  • 321
  • 2
  • 7
1

Make sure you have added GoogleService-Info.plist file to /ios/{projectName}.xcworkspace.

And make sure you have this code in your /ios/{projectName}/AppDelegate.m file.

#import <Firebase.h>
.....
.....
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  [FIRApp configure];
  // ....
}

Follow the exact procedure given in their documentation.

vinayr
  • 11,026
  • 3
  • 46
  • 42
  • Hi @vinayr, please check another issue and let me know if you could help with it please. https://stackoverflow.com/questions/73345616/xcode-lexical-or-preprocessor-issue-redefinition-of-module – VecopWall Aug 14 '22 at 07:44
  • I appreciate that you provided a cool solution which worked like a charm. – VecopWall Aug 14 '22 at 07:45
  • I am still getting same error even after doing what you suggested here. I specified this pod spec `pod 'FirebaseCoreExtension', '~> 6.27.0'`. But still getting error. Any alternatives? – ThinkAndCode Oct 17 '22 at 08:55
0

Try to leave the firebase dependencies to the same version, to avoid possible collisions between versions, for them core (app), like this:

"@react-native-firebase/analytics": "^16.4.4",
"@react-native-firebase/app": "^16.4.4",
"@react-native-firebase/crashlytics": "^16.4.4",
0

If the answers above don't work for you, it's possible you just need to clean your Pods and podfile.lock and try again

Valn1
  • 109
  • 11