React-native-firebase: 馃敟 Firebase/AdMob pod cant find compatible versions. 馃敟

Created on 29 Apr 2019  路  8Comments  路  Source: invertase/react-native-firebase

Issue

Adding the pod pod 'Firebase/AdMob', '~> 5.20.1' causes an error.

Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "Firebase/AdMob":
  In Podfile:
    Firebase/AdMob (~> 5.20.1)

Specs satisfying the `Firebase/AdMob (~> 5.20.1)` dependency were found, but they required a higher minimum deployment target.
CocoaPods could not find compatible versions for pod "FirebaseCore":
  In Podfile:
    Firebase/Core (~> 5.15.0) was resolved to 5.15.0, which depends on
      Firebase/CoreOnly (= 5.15.0) was resolved to 5.15.0, which depends on
        FirebaseCore (= 5.1.10)

    Firebase/Core (~> 5.15.0) was resolved to 5.15.0, which depends on
      FirebaseAnalytics (= 5.4.0) was resolved to 5.4.0, which depends on
        FirebaseCore (~> 5.1)

ios/Podfile

Everything worked fine until I add AdMob to the project.
Current Podfile:

platform :ios, '9.0'

target 'moodPixel' do

  pod 'Firebase/AdMob', '~> 5.20.1'
  pod 'Firebase/Core', '~> 5.15.0'
  pod 'Firebase/Auth', '~> 5.15.0'
  pod 'Firebase/Firestore', '~> 5.15.0'
  pod 'Firebase/Messaging', '~> 5.15.0'
  pod 'GoogleSignIn', '~> 4.4.0'

end
````

## package.json

{
"name": "moodPixel",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
"dependencies": {
"chroma-js": "^2.0.2",
"moment": "^2.23.0",
"react": "16.6.3",
"react-native": "0.57.8",
"react-native-calendar-picker": "^5.22.0",
"react-native-color-picker": "github:FrederickEngelhardt/react-native-color-picker",
"react-native-device-info": "^0.25.1",
"react-native-easy-toast": "^1.1.0",
"react-native-fbsdk": "^0.8.0",
"react-native-firebase": "^5.2.0",
"react-native-fs": "^2.13.3",
"react-native-google-drive-api-wrapper": "^1.1.2",
"react-native-google-signin": "^1.2.2",
"react-native-linear-gradient": "^2.5.3",
"react-native-localization": "^2.1.1",
"react-native-router-flux": "^4.0.6",
"react-native-splash-screen": "^3.1.1",
"react-native-swiper": "^1.5.14",
"react-native-text": "0.0.8",
"react-native-vector-icons": "^6.1.0",
"react-native-video": "^4.4.1",
"react-redux": "^6.0.0",
"redux": "^4.0.1",
"redux-persist": "^5.10.0",
"redux-thunk": "^2.3.0",
"rn-fetch-blob": "^0.10.15",
"unsplash-js": "^5.0.0"
},
"devDependencies": {
"babel-jest": "23.6.0",
"jest": "23.6.0",
"metro-react-native-babel-preset": "0.51.1",
"react-test-renderer": "16.6.3"
},
"jest": {
"preset": "react-native"
},
"rnpm": {
"assets": [
"src/assets/fonts/Poppins"
]
}
}

```

Most helpful comment

In my case I needed to run $ pod repo update and it fixed the error

All 8 comments

So you are attempting to add a 5.20.1 firebase pod while using a bunch of older firebase pods, even though they are released at the same time because they are version locked 馃

@mikehardy I am fairly new to pods.

@wmonecke as am I :-), but, I can say you are going to need all 5.20.1 for that to work. Do not mix Firebase pod versions. In general run "pod outdated" and do everything you can to get them all up to date, periodically, and especially before and then after adding a new one. There are a couple that will not update in Firebase (the grpc related ones) but 5.20.1 used as the version for all of firebase will work. You may also need react-native-firebase 5.3.1 though, which also implies react-native 0.59.3+ (I'm on 0.59.5). Keeping things up to date is a bit of a treadmill but the latest versions of everything do work together

Thanks for the update! I think I will start then by updating react-native to 0.59. Thanks for the help :)

@mikehardy I know this is not the long and definitive way but is there any way that I can install the 5.15.0 AdMob version? I just need this released ASAP.

No supported way I know of other than maybe to downgrade everything else to 5.15.0. I have never tried and am not currently using that version so can't say

I will say that using the rn-diff-purge repo it's pretty easy these days (compared to earlier versions) to find the diffs between react-native versions and apply them with knowledge instead of just hope

In my case I needed to run $ pod repo update and it fixed the error

Was this page helpful?
0 / 5 - 0 ratings