Releases: invertase/react-native-firebase
v5.1.0-rc2
v5.1.0-rc2
Bug fixes
Database
- [android] Database listeners now correctly tearing down between RN reloads #1619 (Fixes #1498 #1611 #1609).
- [js] Fixed an issue where
Reference.toString()
incorrectly contains//
instead of/
when joining the parent and child paths. - [js] Rework
.push()
behaviour to match WebSDK and correctly return a Reference instance in all scenarios. (Fixes #893 #1464 #1572). - [js] Fix a transaction issue when debugger is open. 7face86 (#1503)
Notifications
- [ios] Add missing default case to scheduled notifications with intervals
- [js] Change IOSNotification badge type definition to number
Storage
- [android] Returning
null
withingetDownloadUrl
now successfully resolves.
New Features
Database / Utils
- [js] Added a
firebase.utils().database.cleanup()
utility method which removes all database listeners.
Messaging
- [ios] New
getAPNSToken
method. #1626 @timwangdev - [ios] New
registerForRemoteNotifications
method. #1626 @timwangdev
v5.1.0-rc1
Please 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.
Installation
yarn add [email protected]
or
npm install [email protected]
Changes
- [notifications][ios] fixed a crash on completing a notification #1576
- [notifications][android] fixed multiple
NoSuchMethodError
exceptions on< API 26
(#1550 #1549 #1553 #1399) - [notifications][android] DisplayNotificationTask now correctly uses
WeakReference
to keep ref to Context (avoids mem leaks) - [notifications][android]
removeDeliveredNotificationsByTag
now correctly removes #1546 - [notifications][android] fix
removeDeliveredNotificationsByTag
crash #1392 - [firestore][ios] improve/rework native transaction code to prevent potential race conditions #1556
- [database][js] add reference
toJSON()
to match web sdk - [android][build] force Java 8 target compatibility for JDK 10 - #1070
- [android][build] remove fabric build tools from lib - only needed in users build.gradle
- [android] replace android.support
NonNull
&Nullable
annotation instances with java annotations- removes dependency on android support v4 annotations
- [links][typescript] fix types for
createShortDynamicLink
- #1580 - [functions][typescript] add export of
functions
type #1533 - [metro][js] add workaround for
module-resolver
bug - #1560
SDK Version Updates
- [ios] updated Firebase SDKs to
v5.10.0
- [android] updated gradle build tools to
3.2.0
classpath 'com.android.tools.build:gradle:3.2.0'
- [android] updated default build tools version to
28.0.2
- [android] updated
play-services-base
to16.0.1
- [android] updated Firebase SDKs;
- see /tests/android/app/build.gradle for a reference app build gradle file
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'
- [android] updated build dependencies;
- see /tests/android/build.gradle for a reference project build gradle file
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'
- [android] updated to gradle 4.6
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
v5.0.0
See the website for release notes: https://rnfirebase.io/docs/v5.x.x/release-notes
v4.3.8
Big thanks to all the contributors who helped submit the below changes / report the bugs 🎉
Messaging
- [ios][messaging] fix #1286 - 'getToken resolves to null if called too early'
Notifications
- [android] prefer localised title and body to normal title and body #1337
- [android] add the ability to remove notifications based on the tag #1058 (pending documentation)
- [android] fix rescheduling notification on phone reboot #1312
- Scheduled notifications not being rescheduled on phone reboot #1308
- [android] honour repeatInterval when rescheduling outdated notification #1294
- Scheduled notifications not being rescheduled on phone reboot #1308
Remote Config
- [android][ios] handle remote config throttled exceptions, fixes #1288
Loving react-native-firebase
and the support we provide? Please consider supporting us with any of the below:
- 👉 Back financially via Open Collective
- 👉 Follow
React Native Firebase
andInvertase
on Twitter - 👉 Star this repo on GitHub ⭐️
v4.3.0
v4.3.0 Changelog
As always - huge thanks to all our contributors and everyone that has helped debug issues.
Upgrade Guide
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 - Upgrade Guide
Update your in-use Firebase SDK dependencies to match the following versions:
// 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
}
If you use Crashlytics, update your fabric gradle tools version:
// 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 --------------------------- /\
// ...
iOS - Upgrade Guide
We recommend locking your Firebase SDK pods to the versions in the Podfile example below:
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'
# ...
Admob
- [ios] disable on all 32bit devices to prevent crashes (as not supported) #1253
Analytics
- [ios] fixed deadlock #1195
Auth
- [android] add support for phone auth
ForceResendingToken
, closes #721 - [android] fix crash on
signInAndRetrieveDataWithCredential()
when using twitter auth #1249
Cloud Firestore
- [android][ios] add support for
GetOptions
#1248
Database
- [android] allow apps to use initializeApp() to configure firebase database #1193
IID
- add support for
getToken(string,string)
anddeleteToken(string,string)
- #1215
Notifications
- [android] fix
setDefaults
on Notifications. #1235 - [android] add support for
areNotificationsEnabled
#1164 - [android] fix for
Notification
setProgress
not working #1167 - [android][js] resolve display notification promise #1113
- [android] add support for drawable resources to
AndroidNotification
#1221 - [android][js] closes #1216 : AndroidNotification.setVisibility does not exists #1219
- [js][android] closes #1213 : Incorrect definition of
Android.Importance.None
#1220
Storage
- [ios] fixed deadlock #1195
- [ios] app crashes when storage().putFile is called with assets-library uri on iOS #1232
- [ios][android] firebase Storage image upload ignores contentType metadata #739
- [js] putFile error #1177 - added automatic
decodeURI
'ing on file path - MINOR [js][android] inconsistent paths with/out trailing slashes in firebase.storage.Native #1200
- small breaking change: any paths here that had a trailing slash before will now no longer have one. Adjust your file paths that used these statics to compensate
Typings
- [flow][db] Modifies db Reference push() to return ThenableReference #869
- [ts][config] add type definition for RemoteConfig module #1226
- [ts][iid] add getToken(string,string) and deleteToken(string,string) to typings
- [ts][auth] updated typings for PhoneAuthListener #1185
Misc
- Update fabric tools version to v1.25.4 #1269
Loving react-native-firebase
and the support we provide? Please consider supporting us with any of the below:
- 👉 Back financially via Open Collective
- 👉 Follow
React Native Firebase
andInvertase
on Twitter - 👉 Star this repo on GitHub ⭐️
v4.2.0
v4.2.0 Changelog
If 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.
iOS Breaking Changes
-
This version supports v5+ of the Firebase iOS pods which contained a number of breaking changes"
- If you had previously restricted the version of
Firebase/Core
to4.13.0
, you will need to remove that restriction. - Run
pod update
to get the latest versions of all the Firebase pods.
- If you had previously restricted the version of
Auth
- Full support for the new passwordless email sign in functionality:
fetchSignInMethodsForEmail
,isSignInWithEmailLink
,sendSignInLinkToEmail
andsignInWithEmailLink
Database
- [ios] Use a separate dispatch queue for requests
Firestore
- [ios] Use a separate dispatch queue for requests and callbacks to improve performance - thanks @bzztbomb
Invites
- [android] #1072 Fix a bug with invitation email keys - thanks @arnabkund
Messaging
- [ios] Cache and send data messages received whilst the app is being initialised - fixes #1005
Notifications
- [android] #1073 Fix ClassCastException while parsing fireDate - thanks @dluksza
- [android] #1080 Add support for deleting channels and channel groups - thanks @dluksza
- [android] #1088 Correctly resolve promise when cancelling a notification - thanks @pranjal-jain
- [android] #1074 Support handling of notification actions without waking the UI - thanks @dluksza
- New notification actions docs here: https://rnfirebase.io/docs/v4.2.x/notifications/android-actions
v4.1.0
v4.1.0 Changelog
NEW - Functions
- We now have support for Firebase Cloud Functions within react-native-firebase. Check out the docs for more info.
Android Breaking Changes
- Google recently changed the way their Android libraries are released so each import is now versioned independently.
- This requires a few changes to your build configuration files:
Update 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'
Update android/app/build.gradle
You need to be using at least the following versions of the firebase and gms imports:
- com.google.android.gms:play-services-base: 15.0.0
- com.google.firebase:firebase-core: 15.0.2
- com.google.firebase:firebase-ads: 15.0.0
- com.google.firebase:firebase-auth: 15.1.0
- com.google.firebase:firebase-config: 15.0.0
- com.google.firebase:firebase-crash: 15.0.2
- com.google.firebase:firebase-database: 15.0.0
- com.google.firebase:firebase-firestore: 16.0.0
- com.google.firebase:firebase-functions: 15.0.0
- com.google.firebase:firebase-invites: 15.0.1
- com.google.firebase:firebase-messaging: 15.0.2
- com.google.firebase:firebase-perf: 15.1.0
- com.google.firebase:firebase-storage: 15.0.2
- com.crashlytics.sdk.android:crashlytics: 2.9.1
Firestore Breaking Changes
- The
DocumentListenOptions
andQueryListenOptions
objects passed intoDocumentReference.onSnapshot
andCollectionReference.onSnapshot
have been updated to use a singleMetadataChanges
object - If you were using the
includeDocumentMetadataChanges
andincludeQueryMetadataChanges
flags, then they need to be merged into a singleincludeMetadataChanges
flag instead
v4.0.7
v4.0.7 Changelog
Firestore
- Add Blob support
Notifications
- [android] #1035 Fix Android rescheduled notifications firing immediately - thanks @liamheneghan
- [android] Fix for #996 - Schedule notifications not firing in the background when using big picture
General
- [ios] #1017 Add Firebase/Core to podspec
v4.0.6
v4.0.6 Changelog
Auth
- Fix for #980 - possible race condition when initialising
onAuthStateChanged
Firestore
Notifications
v4.0.5
v4.0.5 Changelog
Firestore
- 0a828aa fix issue with parent() incorrectly returning a Path when it shouldn't return one
Database
- d0b6972 fixed a regression where snapshot.child() would no longer work on array values
Android
- [build] #1007 allow root project to specify dependency versions - thanks @mlc
- [build] fix for #1004 - moved database snapshot utils into it's own class inside database package rather than in the shared utils class.