VecopWall
VecopWall

Reputation: 677

CocoaPods could not find compatible versions for pod "FirebaseCoreExtension"

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!

Upvotes: 4

Views: 8911

Answers (5)

Rodrigo
Rodrigo

Reputation: 372

The way I fixed it in my case was to delete the Podfile.lock file at /ios folder.

Then I run:

npx pod-install

and it updated the dependencies automatically:

Fetching podspec for `boost` from `../node_modules/react-native/third-party-podspecs/boost.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Fetching podspec for `hermes-engine` from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`
[Hermes] Using the release tarball from Maven Central
Downloading dependencies
Installing Firebase 10.21.0 (was 10.20.0)
Installing FirebaseAppCheckInterop 10.22.0 (was 10.21.0)
Installing FirebaseAuth 10.21.0 (was 10.20.0)
Installing FirebaseAuthInterop 10.22.0 (was 10.21.0)
Installing FirebaseCore 10.21.0 (was 10.20.0)
Installing FirebaseCoreExtension 10.21.0 (was 10.20.0)
Installing FirebaseCoreInternal 10.22.0 (was 10.21.0)
Installing FirebaseFirestore 10.21.0 (was 10.20.0)
Installing FirebaseFirestoreInternal 10.22.0 (was 10.21.0)

Upvotes: 0

Valn1
Valn1

Reputation: 169

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

Upvotes: 0

Daniel Diaz
Daniel Diaz

Reputation: 1

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",

Upvotes: 0

Ebrahim Sayed
Ebrahim Sayed

Reputation: 340

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

"yarn add @react-native-firebase/app"

Upvotes: 2

vinayr
vinayr

Reputation: 11234

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.

Upvotes: 1

Related Questions