Skip to content

Releases: invertase/react-native-firebase

v2.1.3

31 Aug 07:28
Compare
Choose a tag to compare

Changelog

  • [admob] Fix issue with static event types

v2.1.2

22 Aug 09:56
Compare
Choose a tag to compare

Changelog

  • [ios] Make iOS installation more resilient

v3.0.0

07 Aug 16:23
Compare
Choose a tag to compare

Take me to the docs!

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).

  • #f03c15 [breaking] new RNFirebase() is no longer supported. See below for information about app initialisation.
  • #f03c15 [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 an already 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.
  • 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
  • #f03c15 [breaking] Third party providers now user providerId rather than provider as per the Web SDK. If you are manually creating your credentials, you will need to update the field name.

Firestore

Database

  • database() now supports passing an instance of App as the first argument
  • once now supports context as per the web sdk
  • remove now supports onComplete callbacks (and promises) as per the web sdk
  • update now supports onComplete callbacks (and promises) as per the web sdk
  • setWithPriority now supports onComplete callbacks (and promises) as per the web sdk
  • setPriority now supports onComplete callbacks (and promises) as per the web sdk
  • set now supports onComplete callbacks (and promises) as per the web sdk
  • keepSynced 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.
  • [ios] implemented missing onDisconnectUpdate method. See #272.
  • #f03c15 [breaking] error messages and codes internally re-written to match the web sdk
  • #f03c15 [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.
  • #f03c15 [breaking] on/off behaviour changes. Previous off behaviour was incorrect. A SyncTree/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 file content/type automatically for images and videos (Android TODO)
  • #f03c15 [breaking] UploadTaskSnapshot -> downloadUrl renamed to downloadURL 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:
    image
  • QoL change: added Groovy script to RNFirebase build.gradle to automatically detect duplicate dex build failures:
    image

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

03 Aug 08:05
Compare
Choose a tag to compare

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

31 Jul 09:47
Compare
Choose a tag to compare

Changelog

Database

  • [ios] Fix log warnings #233
  • [android][ios] Add missing setPriority and setWithPriority 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

19 Jul 12:03
Compare
Choose a tag to compare

Changelog

Messaging

  • [ios] Re-added didReceiveNotificationResponse and willPresentNotification

View build details and download artifacts on buddybuild:
ReactNativeFirebaseDemo (iOS, ReactNativeFirebaseDemo)
ReactNativeFirebaseDemo (Android)

v2.0.3

12 Jul 15:30
Compare
Choose a tag to compare

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

05 Jul 14:01
Compare
Choose a tag to compare

Changelog

Auth

  • [both] implemented missing confirmPasswordResetmethod
  • [both] implemented missing applyActionCodemethod
  • [both] implemented missing checkActionCodemethod

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

04 Jul 14:55
Compare
Choose a tag to compare
  • [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:

v1.1.2

20 Jun 19:10
Compare
Choose a tag to compare

Changelog

  • [ios] sendEmailVerification now correctly returns currentUser - thanks @jasan-s for helping us debug it.