Releases: invertase/react-native-firebase
v2.1.3
Changelog
- [admob] Fix issue with static event types
v2.1.2
Changelog
- [ios] Make iOS installation more resilient
v3.0.0
CHANGE LOG.
This release is mainly aimed at adding firebase 'core' functionality, adding phone auth functionality and also a first pass at Cloud Firestore support. There's also been further adjustments to bring the modules in line with the web sdk api. Additionally there's been a lot of internal code improvements aimed at performance and improving QoL for module development.
Whilst every effort has been taken to document all breaking changes there may still be a chance that some undocumented breaking changes have snuck in as this was probably one of the largest releases to date code wise. 🙈 If you come across one then please let us know, we can document it.
Migration guide
See: http://invertase.link/v2-v3
Core
This release introduces full firebase core support. This means multiple firebase apps are now supported both in JS and native android/ios code (initialise additional apps on either end to have the app available in both automatically).
- [breaking]
new RNFirebase()
is no longer supported. See below for information about app initialisation. - [deprecation]
initializeApp()
for apps that are already initialised natively (i.e. the default app initialised via google-services plist/json) will now log a deprecation warning.- As these apps are already initialised natively there's no need to call
initializeApp
in your JS code. For now, calling it will just return the app that's already internally initialised - in a future version this will throw analready initialized
exception. - Accessing apps can now be done the same way as the web sdk, simply call
firebase.app()
to get the default app, or with the name of specific app as the first arg, e.g.const meow = firebase.app('catsApp');
to get a specific app.
- As these apps are already initialised natively there's no need to call
FirebaseApp.extendApp(props: Object)
support added.- RNFirebase no longer requires a singleton exported instance of your app to work (though you can still do this if you'd like). You can now just import RNFirebase in any module and straight away access all the initialised apps. e.g. :
import firebase from 'react-native-firebase';
// get started immediately with the default app for example
firebase.database().ref('kittens').once('value', (snapshot) => {
console.log('kittenslol', snapshot.val());
});
// or get some other app
const dogsApp = firebase.apps('doge');
// then it's either:
// 1)
dogsApp.database().ref('puppies').once('value', (snapshot) => {
console.log('muchwow', snapshot.val());
});
// 2) or this one
firebase.database(dogsApp).ref('puppies').once('value', (snapshot) => {
console.log('muchwow', snapshot.val());
});
See the docs for the following:
- initialising additional apps via js
- why js app initialisation is not supported for the default app
app.onReady(): Promise
and why it's needed for JS initialised apps.
- which firebase modules support multiple apps
- delete app caveats - e.g cannot delete default apps, cannot delete apps on android, cannot get app config clientId on ios - see issue comments on firebase repo: firebase/firebase-ios-sdk#140 (comment)
firebase.SDK_VERSION
firebase.DEFAULT_APP_NAME
Auth
auth()
now supports passing an instance of App as the first argument- Phone authentication via verifyPhoneNumber. See #119
- [breaking] Third party providers now user
providerId
rather thanprovider
as per the Web SDK. If you are manually creating your credentials, you will need to update the field name.
Firestore
- First pass at support for the newly released Cloud Firestore beta, see http://invertase.link/firestore for supported api's.
Database
database()
now supports passing an instance of App as the first argumentonce
now supportscontext
as per the web sdkremove
now supports onComplete callbacks (and promises) as per the web sdkupdate
now supports onComplete callbacks (and promises) as per the web sdksetWithPriority
now supports onComplete callbacks (and promises) as per the web sdksetPriority
now supports onComplete callbacks (and promises) as per the web sdkset
now supports onComplete callbacks (and promises) as per the web sdkkeepSynced
now correctly takes into account query modifiers natively, was ignoring these before- improved native
transaction
implementations to have better error handling and timeout checks (mainly for whilst running in dev)- [websdk-diff] the web sdk transaction errors return one worded errors that don't make much sense and have no error codes or description like all the other database errors do. RNFirebase internally maps these into the database error codes we're accustomed to, for example the one worder above comes back as
The transaction was overridden by a subsequent set. (database/overridden-by-set)
instead.
- [websdk-diff] the web sdk transaction errors return one worded errors that don't make much sense and have no error codes or description like all the other database errors do. RNFirebase internally maps these into the database error codes we're accustomed to, for example the one worder above comes back as
- [ios] implemented missing
onDisconnectUpdate
method. See #272. - [breaking] error messages and codes internally re-written to match the web sdk
- [breaking]
ref.isEqual
now checks the query modifiers as well as the ref path (was just path before). With the release of multi apps/core support this check now also includes whether the refs are for the same app. - [breaking] on/off behaviour changes. Previous
off
behaviour was incorrect. ASyncTree/Repo
implementation was added to provide the correct behaviour you'd expect in the web sdk. Whilst this is a breaking change it shouldn't be much of an issue if you've previously setup your on/off handling correctly. See #160 for specifics of this change. - [internal] re-wrote native android & ios methods to now use RN promise implementation - was callbacks before with a callback to promise wrapper in JS
- [js]
ThenableReference
support implemented, for now this is just for.push()
. See #147.
Storage
storage()
now supports passing an instance of App as the first argument- [ios]
putFile
now sets the remote filecontent/type
automatically for images and videos (Android TODO) - [breaking] UploadTaskSnapshot ->
downloadUrl
renamed todownloadURL
to match web sdk
Misc
- We're now using
Apache License 2.0
to license this library. - [internal] re-wrote event emitter / subscriptions logic to be more performant and to support multiple database/app instances. This is for events such as storage task events, database transaction/realtime events and authentication state changes.
- QoL change: added more descriptive errors on incorrect setup of native modules, e.g:
- QoL change: added Groovy script to RNFirebase build.gradle to automatically detect duplicate dex build failures:
Known Issues
As these aren't major issues we've decided that they shouldn't hold back the release of v3,
- Currently no way to enable RNFirebase debug logging.
v2.1.0
Changelog
- [android] Support breaking changes in react native 0.47.0
Note: This version is still backwards compatible with earlier versions of React Native: 0.40.0+
View build details and download artifacts on buddybuild:
ReactNativeFirebaseDemo (iOS, ReactNativeFirebaseDemo)
ReactNativeFirebaseDemo (Android)
v2.0.5
Changelog
Database
- [ios] Fix log warnings #233
- [android][ios] Add missing
setPriority
andsetWithPriority
methods
Config
- [ios] Fix missing import #234
- [ios] Fix incorrect status message when remote config fetch is successful #280 (Thanks @akshetpandey)
View build details and download artifacts on buddybuild:
ReactNativeFirebaseDemo (iOS, ReactNativeFirebaseDemo)
v2.0.4
Changelog
Messaging
- [ios] Re-added
didReceiveNotificationResponse
andwillPresentNotification
View build details and download artifacts on buddybuild:
ReactNativeFirebaseDemo (iOS, ReactNativeFirebaseDemo)
ReactNativeFirebaseDemo (Android)
v2.0.3
Changelog
Auth
- [both] Implemented missing user unlink method (#242):
firebase.auth().currentUser.unlink(providerId: string): Promise<FirebaseUser>
View build details and download artifacts on buddybuild:
ReactNativeFirebaseDemo (iOS, ReactNativeFirebaseDemo)
ReactNativeFirebaseDemo (Android)
v2.0.2
Changelog
Auth
- [both] implemented missing
confirmPasswordReset
method - [both] implemented missing
applyActionCode
method - [both] implemented missing
checkActionCode
method
Misc changes to tests documentation also: http://invertase.io/react-native-firebase/#/contributing/testing
View build details and download artifacts on buddybuild:
ReactNativeFirebaseDemo (iOS, ReactNativeFirebaseDemo)
ReactNativeFirebaseDemo (Android)
v2.0.1
- [admob] Added
openDebugMenu
functionality (@Ehesp c22fb39) - [admob][ios] Fixed an issue which didn't allow Interstitials to be initialised loaded again with the same adUnit ID (@Ehesp 92b3860)
- [database][both] Fixed an issue where the reference from a child snapshot was being returned as the parent reference when listening to child events. (@Salakar d1196b9) - thanks @TiraO for the test + issue report (#221).
- [database][both] all 'once' event types are now supported (
child_added
for example) - not just 'value'. (@Salakar 2f67e8b) - [database][typings] Timestamp is now available on ServerValue:
database.ServerValue.TIMESTAMP
(@agentilela bc2f2c4) - [storage] Fixed meta data not correctly being applied (@nico1510 d77dd09)
View build details and download artifacts on buddybuild:
ReactNativeFirebaseDemo (iOS, ReactNativeFirebaseDemo)
ReactNativeFirebaseDemo (Android)
View build details and download artifacts on buddybuild: