Skip to content

Releases: invertase/react-native-firebase

v1.1.1

16 Jun 16:28
Compare
Choose a tag to compare

Changelog

[android][database] Fix hanging db when querying database object with large numeric keys
[ios] Remove react-native link installation scripts to minimise installation issues

v2.0.0

25 May 14:11
Compare
Choose a tag to compare

Migration guide

A guide to upgrading from v1 to v2 can be found on the docs here.

Change Log

Version 2.0.0 of RNFirebase introduces new features, breaking changes, deprecations (matching v4 of the web SDK) and general build / dependency improvements.

New Features

Ads

  • Implemented Admob Banner view
  • Implemented Admob Interstitials
  • Implemented Admob Rewarded Video
  • Implemented Admob Native Express

Performance Monitoring

RNFirebase now supports the recently released Performance Monitoring module. Much like Crash Reporting, automatic events (traces) are delivered to your console whilst providing support to register custom traces. See the documentation on how to use this in your app.

Implemented methods:

  • setPerformanceCollectionEnabled(enabled: boolean)
  • newTrace(id: string): Trace
  • Trace.start(): void
  • Trace.incrementCounter(event: string): void
  • Trace.stop(): void

Remote Config

  • [both] Implemented remote config in v1.1.0 - adding here for sake of completeness. Documentation

Auth

Crash

  • [android] Implemented new crash log disabling methods.

Bug Fixes

  • [js] Fixed an issue whereby the result of onAuthStateChange returned a different result on state changes.

Breaking Changes & Deprecations

  • [breaking] RNFirebase v2.0.0 drops support for React Native versions less than v40
  • [deprecated] providerId should now be used instead of provider whilst obtaining auth credentials. The latter will be removed in future releases.
  • [deprecated] Deprecated User.getToken in favour of User.getIdToken.
  • [breaking] User.reauthenticate has been removed in favour of User.reauthenticateWithCredential.
  • [breaking] User.link has been removed in favour of User.linkWithCredential.
  • [breaking] Removed unnecessary didReceiveNotificationResponse and willPresentNotification methods for iOS messaging. Added additional didReceiveRemoteNotification method.
  • [breaking] firebase.messaging().onTokenRefresh and firebase.messaging().onMessage return a function to unsubscribe as per the Web SDK spec: https://firebase.google.com/docs/reference/js/firebase.messaging.Messaging#onMessage. Previously they returned an object with a .remove() method.

Android

All firebase modules are now optional so you only need to import the Firebase functionality that you require in your application.

You need to make a couple of changes to your app/build.gradle file. Update the react-native-firebase compile statement to read:

compile(project(':react-native-firebase')) {
  transitive = false
}
compile "com.google.firebase:firebase-core:11.0.0"

Add each of the firebase modules you need from the following list:

compile "com.google.firebase:firebase-ads:11.0.0"
compile "com.google.firebase:firebase-analytics:11.0.0"
compile "com.google.firebase:firebase-auth:11.0.0"
compile "com.google.firebase:firebase-config:11.0.0"
compile "com.google.firebase:firebase-crash:11.0.0"
compile "com.google.firebase:firebase-database:11.0.0"
compile "com.google.firebase:firebase-messaging:11.0.0"
compile "com.google.firebase:firebase-perf:11.0.0"
compile "com.google.firebase:firebase-storage:11.0.0"

Update MainApplication.java and import the modules as required:

import io.invertase.firebase.admob.RNFirebaseAdMobPackage; //Firebase AdMob
import io.invertase.firebase.analytics.RNFirebaseAnalyticsPackage; // Firebase Analytics
import io.invertase.firebase.auth.RNFirebaseAuthPackage; // Firebase Auth
import io.invertase.firebase.config.RNFirebaseRemoteConfigPackage; // Firebase Remote Config
import io.invertase.firebase.crash.RNFirebaseCrashPackage; // Firebase Crash Reporting
import io.invertase.firebase.database.RNFirebaseDatabasePackage; // Firebase Realtime Database
import io.invertase.firebase.messaging.RNFirebaseMessagingPackage; // Firebase Cloud Messaging
import io.invertase.firebase.perf.RNFirebasePerformancePackage; // Firebase Performance Monitoring
import io.invertase.firebase.storage.RNFirebaseStoragePackage; // Firebase Storage

Add the packages to the getPackages() method as required:

@Override
    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
          new MainReactPackage(),
          new RNFirebasePackage(),  // <-- Add this line
          // Add these packages as appropriate
          new RNFirebaseAdMobPackage(),
          new RNFirebaseAnalyticsPackage(),
          new RNFirebaseAuthPackage(),
          new RNFirebaseRemoteConfigPackage(),
          new RNFirebaseCrashPackage(),
          new RNFirebaseDatabasePackage(),
          new RNFirebaseMessagingPackage(),
          new RNFirebasePerformancePackage(),
          new RNFirebaseStoragePackage()
      );
    }

iOS

All firebase modules are now optional so you only need to import the Firebase functionality that you require in your application. Simply update your Podfile to only include the Firebase modules for functionality that you require in your app.

v1.1.0

24 May 20:24
Compare
Choose a tag to compare

Changelog

These release notes cover the major changes for versions v1.0.2...v1.1.0

General

  • Updated typescript definitions (@taljacobson)
  • [android] Updated Firebase version to 10.2.6. iOS will be upgraded once tests are passing.

Database

  • Standardise error messages and add context support for Reference.on() (@greena13 8d66554)
  • [ios] Fixed an issue whereby the iOS snapshot was not consistent with the web SDK (#100)

Remote Config

Remote config has been implemented on both Android & iOS (@akshetpandey)

v1.0.2

05 May 09:30
Compare
Choose a tag to compare

Changelog

This change log includes changes for alpha14 + v1.0.1 releases.

General

  • [npm] dropped alpha versioning and switch to first full release starting at v1.0.1.
  • [react-native][ios] add backwards support for react-native imports - to handle breaking change in RN v40. Fixes #80 . da556ae

Database

  • [android] fixed a regression issue with startAt and endtAt query modifiers. 7c9b094
  • [android] fixed type conversion issue with limitToLast query modifier.b462200

Test app

  • [android] Update gradle version. 67bc409
  • [android] update react-navigation dependancy. 1666bc1

v1.0.0-alpha13

27 Apr 11:32
Compare
Choose a tag to compare
v1.0.0-alpha13 Pre-release
Pre-release

Changelog

Crash reporting

[ios] Fixed CrashReporting imports

Database

[js][android][ios] Support multiple listeners on a ref
[ios] Fixed onDisconnectSet
[js] Add ref property for consistency with web API
[js] Add ref().isEqual()

Storage

[js] uploadTask.on now correctly handles next or observer args as per firebase web sdk
[js][android][ios] uploadTask.on now correctly receives a success status event
[android] fix readable map already consumed error

Misc

[js][android] Use GoogleApiAvailability to prompt the user to install Google Play Services if it is not installed

Known Issues

[storage] upload/download task promises implementation currently WIP and may break if used, use the event callbacks instead.

1.0.0-alpha12

05 Apr 08:20
Compare
Choose a tag to compare
1.0.0-alpha12 Pre-release
Pre-release

Changelog

  • [js][ios][messaging] fixed misc messaging .send() type errors

1.0.0-alpha11

31 Mar 08:50
Compare
Choose a tag to compare
1.0.0-alpha11 Pre-release
Pre-release

Changelog

All platforms

  • [messaging] Implemented upstream RemoteMessage builder and fcm .send() to send them. Example usage can be seen here. 91e9263
  • [auth] getToken now correctly accepts forceRefresh boolean arg. 48e57d2

1.0.0-alpha10

29 Mar 17:04
Compare
Choose a tag to compare
1.0.0-alpha10 Pre-release
Pre-release

Changes

Android

  • [storage] implemented storage methods to match ios, fixes the android storage breaking change in alpha9. @Salakar
  • [messaging] added missing boot event receiver for scheduled notifications. @chrisbianca

IOS

  • [messaging] fixed issue with notification .finish() incorrectly expecting an object instead of a string. @chrisbianca
  • [messaging] add a promise response to iOS messaging requestPermissions to return permission popup response (iOS 10+) @chrisbianca

And misc docs from @Ehesp and @chrisbianca

1.0.0-alpha9

25 Mar 01:09
Compare
Choose a tag to compare
1.0.0-alpha9 Pre-release
Pre-release

Changes

Big feature landed, brace yourself...

Transactions

  • Implemented transaction support for both android and ios platforms.

1.0.0-alpha8

23 Mar 01:15
Compare
Choose a tag to compare
1.0.0-alpha8 Pre-release
Pre-release

Changes

  • [ios][storage] storage re-implemented to use native promises
  • [ios][storage] errors now mirror web sdk errors e.g. storage/unauthorized
  • [ios][storage] fixed an issue where certain storage NSErrors were unable to be sent across RNBridge
  • [js][database] firebase.database().ServerValue moved to firebase.database.ServerValue
  • [js][storage] fixed an issue with StorageTask.then/.catch being incorrectly bound
  • [js][storage] implemented firebase.storage.TaskState enums
  • [js][storage] implemented firebase.storage.TaskEvent enums
  • [js][storage] moved firebase.storage().constants to firebase.storage.Native to match other enums
  • misc docs

Note: Android storage is currently broken due to the js updates, will fix this in alpha9 in the next day or so.