iosfirebasereact-nativecocoapods

@react-native-firebase pod version conflict for Firebase/CoreOnly


I have a react-native project with these dependencies (all are the latest available):

    "@react-native-firebase/analytics": "^14.5.1",
    "@react-native-firebase/app": "^14.5.1",
    "@react-native-firebase/config": "^0.1.5",
    "@react-native-firebase/perf": "^14.5.1",

But when I go to pod install, I get:

[!] CocoaPods could not find compatible versions for pod "Firebase/CoreOnly":
  In Podfile:
    RNFBApp (from `../node_modules/@react-native-firebase/app`) was resolved to 14.5.1, which depends on
      Firebase/CoreOnly (= 8.12.1)

    RNFBConfig (from `../node_modules/@react-native-firebase/config`) was resolved to 0.1.5, which depends on
      Firebase/RemoteConfig (~> 6.5.0) was resolved to 6.5.0, which depends on
        Firebase/CoreOnly (= 6.5.0)

I do not understand why config has a different version to all the others and how the latest versions of a project are conflicting.

I have tried the following to fix this: rm -rf ios/Pods ios/Podfile.lock pod repo remove trunk pod install pod update pod install --repo-update

My ios/Podfile does not contain explicit pods for Firebase.

Usually these commands tend to fix problems like this. But not this time. Thanks for any suggestions.


Solution

  • react-native-firebase maintainer here!

    The 'config' package was wrapping the firebase "Remote Config" SDK packages, so that name was not used in the final release of react-native-firebase - we used "remote-config" in the end, but the alpha releases with the wrong name were still up on npmjs.com.

    I just deprecated all versions of that package on npmjs.com so users should get a warning if they try to install it - no one should use that package. If you use the 'remote-config' one, you'll be all set I think