React-native-firebase: v6 how to override built-in SDK versions / use Firebase iOS Pod 6.13.0 + Android BoM 24.2.0

Created on 25 Nov 2019  路  8Comments  路  Source: invertase/react-native-firebase

Hi !

Is it possible to update the Firebase SDK to 6.13.0 ? We are having a lot of crash on iOS 13 because the version of the Mobile Ads SDK is actually set to 7.49.0.

iOS13 is officially supported by the Mobile Ads SDK with 7.50.x
https://developers.google.com/admob/ios/rel-notes

Is it safe to use $FirebaseSDKVersion = '6.13.0' in Podfil to override for the moment ?

We are using Admob, Analytics and Crashlytics.

Thank you !

Android iOS No Template Solution Provided Firebase >= 6

All 8 comments

You ignored the template, so it's hard to say.
With react-native-firebase v5.5.6 the iOS firebase 6.13.0 version works fine.
with react-native-firebase v6 it will work great except if you use the ML features. They had a breaking change somewhere around 6.11 I think (I forget, I don't use them, but it's in the upstream google release notes)

Thank you mike ! sorry for the template :-/
The question was for react-native-firebase v6

So if you use the MLKit stuff it'll break but I think react-native-firebase will be forward-ported to the new APIs there soon. If you don't use MLKit, you'll be fine - and the break is a build failure so you'll know one or the other easily. Good luck

Yes thanks again, everything is building correctly on iOS and Android 馃憤

@mikehardy just one more question, on iOS I have the confirmation the default version is overwrited but not on Android.

When building :

> Configure project :@react-native-firebase_admob
:@react-native-firebase_admob:firebase.bom using default value: 21.1.0
:@react-native-firebase_admob:ads.consent using default value: 1.0.6
:@react-native-firebase_admob package.json found at /Users/manu/C/C-app/node_modules/@react-native-firebase/admob/package.json
:@react-native-firebase_admob:version set from package.json: 6.0.4 (6,0,4 - 6000004)
:@react-native-firebase_admob:android.compileSdk using custom value: 28
:@react-native-firebase_admob:android.targetSdk using custom value: 28
:@react-native-firebase_admob:android.minSdk using custom value: 16
:@react-native-firebase_admob:reactNativeAndroidDir /Users/manu/C/C-app/node_modules/react-native/android

> Configure project :@react-native-firebase_analytics
:@react-native-firebase_analytics:firebase.bom using default value: 21.1.0
:@react-native-firebase_analytics package.json found at /Users/manu/C/C-app/node_modules/@react-native-firebase/analytics/package.json
:@react-native-firebase_analytics:version set from package.json: 6.0.4 (6,0,4 - 6000004)
:@react-native-firebase_analytics:android.compileSdk using custom value: 28
:@react-native-firebase_analytics:android.targetSdk using custom value: 28
:@react-native-firebase_analytics:android.minSdk using custom value: 16
:@react-native-firebase_analytics:reactNativeAndroidDir /Users/manu/C/C-app/node_modules/react-native/android

> Configure project :@react-native-firebase_app
:@react-native-firebase_app:firebase.bom using default value: 21.1.0
:@react-native-firebase_app package.json found at /Users/manu/C/C-app/node_modules/@react-native-firebase/app/package.json
:@react-native-firebase_app:version set from package.json: 6.0.4 (6,0,4 - 6000004)
:@react-native-firebase_app:android.compileSdk using custom value: 28
:@react-native-firebase_app:android.targetSdk using custom value: 28
:@react-native-firebase_app:android.minSdk using custom value: 16
:@react-native-firebase_app:reactNativeAndroidDir /Users/manu/C/C-app/node_modules/react-native/android

> Configure project :@react-native-firebase_crashlytics
:@react-native-firebase_crashlytics:firebase.crashlytics using default value: 2.10.0
:@react-native-firebase_crashlytics:firebase.crashlyticsNdk using default value: 2.1.0
:@react-native-firebase_crashlytics package.json found at /Users/manu/C/C-app/node_modules/@react-native-firebase/crashlytics/package.json
:@react-native-firebase_crashlytics:version set from package.json: 6.0.4 (6,0,4 - 6000004)
:@react-native-firebase_crashlytics:android.compileSdk using custom value: 28
:@react-native-firebase_crashlytics:android.targetSdk using custom value: 28
:@react-native-firebase_crashlytics:android.minSdk using custom value: 16
:@react-native-firebase_crashlytics:reactNativeAndroidDir /Users/manu/C/C-app/node_modules/react-native/android

I've added this on android/app/build.gradle :

project.ext {
  set('react-native', [
    versions: [
      firebase: [
        bom : "24.2.0",
      ],
    ],
  ])
}

Note on https://github.com/mikehardy/rnfbdemo/blob/master/make-demo-v6.sh#L28
you add it on android/build.gradle the doc specify android/app/build.gradle

I've tried both with no changes.

With ./gradlew :app:dependencies |sort|uniq I can see I'm not using the overwrited versions.
What do you think I'm missing ?

Thanks again !

I tested mine and it is definitely working with the line you linked in the script. The problem is in reporting it - a bug I found and fixed in the plugin: https://github.com/invertase/react-native-gradle-plugin/pull/1/files

So if you see it say "custom" value and the dependencies check produces output you expect, it's actually taking affect but the reporting is off until release of plugin - 1.4 I think

Exact, I didn't notice the word "custom" when I was trying with your script :P
Thank you !

This stuff is all just a little bleeding edge and I think others will come after you for the same reason, so I just altered the title to hopefully catch more people with the similar problem so they can self-help

Was this page helpful?
0 / 5 - 0 ratings