Home > Software design >  CocoaPods could not find compatible versions for pod "FirebaseCoreExtension"
CocoaPods could not find compatible versions for pod "FirebaseCoreExtension"

Time:08-11

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!

CodePudding user response:

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.

  • Related