🔥 A well-tested feature-rich modular Firebase implementation for React Native. Supports both iOS & Android platforms for all Firebase services.
Reference.toString()
incorrectly contains //
instead of /
when joining the parent and child paths..push()
behaviour to match WebSDK and correctly return a Reference instance in all scenarios. (Fixes #893 #1464 #1572).null
within getDownloadUrl
now successfully resolves.firebase.utils().database.cleanup()
utility method which removes all database listeners.getAPNSToken
method. https://github.com/invertase/react-native-firebase/pull/1626 @timwangdevregisterForRemoteNotifications
method. https://github.com/invertase/react-native-firebase/pull/1626 @timwangdevPlease report any bugs with this RC in the #pre-releases channel on Discord or through a GitHub issue with a
[v5.1.0-rc1]
tag in the title.
yarn add [email protected]
or
npm install [email protected]
NoSuchMethodError
exceptions on < API 26
(#1550 #1549 #1553 #1399)WeakReference
to keep ref to Context (avoids mem leaks)removeDeliveredNotificationsByTag
now correctly removes #1546removeDeliveredNotificationsByTag
crash #1392toJSON()
to match web sdkNonNull
& Nullable
annotation instances with java annotations
createShortDynamicLink
- #1580functions
type #1533module-resolver
bug - #1560v5.10.0
3.2.0
classpath 'com.android.tools.build:gradle:3.2.0'
28.0.2
play-services-base
to 16.0.1
implementation "com.google.firebase:firebase-core:16.0.4"
/* -------------------------
* OPTIONAL FIREBASE SDKS
* ------------------------- */
implementation('com.google.firebase:firebase-ads:15.0.1') {
// exclude `customtabs` as the support lib version is out of date
// we manually add it as a dependency below with a custom version
exclude group: 'com.android.support', module: 'customtabs'
}
// Authentication
implementation "com.google.firebase:firebase-auth:16.0.4"
// Analytics
implementation "com.google.firebase:firebase-analytics:16.0.4"
// Performance Monitoring
implementation "com.google.firebase:firebase-perf:16.1.2"
// Remote Config
implementation "com.google.firebase:firebase-config:16.0.1"
// Cloud Storage
implementation "com.google.firebase:firebase-storage:16.0.3"
// Invites
implementation "com.google.firebase:firebase-invites:16.0.4"
// Dynamic Links
implementation "com.google.firebase:firebase-dynamic-links:16.1.2"
// Real-time Database
implementation "com.google.firebase:firebase-database:16.0.3"
// Cloud Functions
implementation "com.google.firebase:firebase-functions:16.1.1"
// Cloud Firestore
implementation "com.google.firebase:firebase-firestore:17.1.1"
// Cloud Messaging / FCM
implementation "com.google.firebase:firebase-messaging:17.3.3"
// Crashlytics
implementation('com.crashlytics.sdk.android:crashlytics:2.9.5@aar') {
transitive = true
}
/* --------------------------------
* OPTIONAL SUPPORT LIBS
* -------------------------------- */
// For Firebase Ads
implementation "com.android.support:customtabs:27.1.1"
// For React Native Firebase Notifications
implementation 'me.leolin:ShortcutBadger:1.1.21@aar'
classpath 'com.android.tools.build:gradle:3.2.0'
classpath 'com.google.gms:google-services:4.0.1'
classpath 'com.google.firebase:firebase-plugins:1.1.5'
classpath 'io.fabric.tools:gradle:1.25.4'
You can update your gradle if required by adding the following at the bottom of your /android/build.gradle
task wrapper(type: Wrapper) {
gradleVersion = '4.6'
distributionUrl = distributionUrl.replace("bin", "all")
}
Or by modifying the distributionUrl
in /android/gradle/wrapper/gradle-wrapper.properties
See the website for release notes: https://rnfirebase.io/docs/v5.x.x/release-notes
Big thanks to all the contributors who helped submit the below changes / report the bugs 🎉
Loving react-native-firebase
and the support we provide? Please consider supporting us with any of the below:
React Native Firebase
and Invertase
on TwitterAs always - huge thanks to all our contributors and everyone that has helped debug issues.
This release does NOT support React Native v0.56.x - this will come in the v5.0.0 release due to backwards incompatible breaking changes.
See minor storage change below and update your code if it affects you.
Our testing project can also be inspected as a reference / guide to versions etc. It's located here.
// android/app/build.gradle
// RNFirebase required dependencies
implementation "com.google.firebase:firebase-core:16.0.1"
implementation "com.google.android.gms:play-services-base:15.0.1"
// RNFirebase optional dependencies
implementation "com.google.firebase:firebase-ads:15.0.1"
implementation "com.google.firebase:firebase-auth:16.0.2"
implementation "com.google.firebase:firebase-config:16.0.0"
implementation "com.google.firebase:firebase-crash:16.0.1"
implementation "com.google.firebase:firebase-database:16.0.1"
implementation "com.google.firebase:firebase-firestore:17.0.2"
implementation "com.google.firebase:firebase-functions:16.0.1"
implementation "com.google.firebase:firebase-invites:16.0.1"
implementation "com.google.firebase:firebase-storage:16.0.1"
implementation "com.google.firebase:firebase-messaging:17.1.0"
implementation "com.google.firebase:firebase-perf:16.0.0"
implementation('com.crashlytics.sdk.android:crashlytics:2.9.3@aar') {
transitive = true
}
// android/build.gradle
// ...
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.google.gms:google-services:4.0.1'
classpath 'com.google.firebase:firebase-plugins:1.1.1'
// ... THIS --------------------------- \/
classpath 'io.fabric.tools:gradle:1.25.4'
// ... THIS --------------------------- /\
// ...
Going forward we'll only be supporting specific versions per release, this is to prevent issues with compilation on xcode e.g. missing symbols.
# ...
pod 'Firebase/AdMob', '~> 5.3.0'
pod 'Firebase/Auth', '~> 5.3.0'
pod 'Firebase/Core', '~> 5.3.0'
pod 'Firebase/Crash', '~> 5.3.0'
pod 'Firebase/Database', '~> 5.3.0'
pod 'Firebase/Functions', '~> 5.3.0'
pod 'Firebase/DynamicLinks', '~> 5.3.0'
pod 'Firebase/Firestore', '~> 5.3.0'
pod 'Firebase/Invites', '~> 5.3.0'
pod 'Firebase/Messaging', '~> 5.3.0'
pod 'Firebase/RemoteConfig', '~> 5.3.0'
pod 'Firebase/Storage', '~> 5.3.0'
pod 'Firebase/Performance', '~> 5.3.0'
pod 'Fabric', '~> 1.7.5'
pod 'Crashlytics', '~> 3.10.4'
# ...
ForceResendingToken
, closes #721
signInAndRetrieveDataWithCredential()
when using twitter auth #1249GetOptions
#1248getToken(string,string)
and deleteToken(string,string)
- https://github.com/invertase/react-native-firebase/pull/1215
setDefaults
on Notifications. #1235areNotificationsEnabled
#1164Notification
setProgress
not working #1167AndroidNotification
#1221Android.Importance.None
#1220decodeURI
'ing on file pathLoving react-native-firebase
and the support we provide? Please consider supporting us with any of the below:
React Native Firebase
and Invertase
on TwitterIf you are upgrading from a version prior to v4.1.0, please make sure you have checked for breaking changes in the release notes for all missed versions.
This version supports v5+ of the Firebase iOS pods which contained a number of breaking changes"
Firebase/Core
to 4.13.0
, you will need to remove that restriction.pod update
to get the latest versions of all the Firebase pods.fetchSignInMethodsForEmail
, isSignInWithEmailLink
, sendSignInLinkToEmail
and signInWithEmailLink
android/build.gradle
Check that you're using the following versions of these plugins:
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.google.gms:google-services:3.2.1'
android/app/build.gradle
You need to be using at least the following versions of the firebase and gms imports:
DocumentListenOptions
and QueryListenOptions
objects passed into DocumentReference.onSnapshot
and CollectionReference.onSnapshot
have been updated to use a single MetadataChanges
objectincludeDocumentMetadataChanges
and includeQueryMetadataChanges
flags, then they need to be merged into a single includeMetadataChanges
flag insteadonAuthStateChanged
.where
TypeScript typings - thanks @awmichel