react-native-firebase

🔥 A well-tested feature-rich modular Firebase implementation for React Native. Supports both iOS & Android platforms for all Firebase services.

OTHER License

Downloads
5.9M
Stars
11.7K
Committers
513

Bot releases are hidden (Show)

react-native-firebase - v3.3.0

Published by Salakar over 6 years ago

v3.3.0 Changelog

TL;DR: Main focus of this release is Cloud Firestore Transaction support + minor bug fixes and SDK version upgrades.

Cloud Firestore

Analytics

Auth

  • Add missing reauthenticateAndRetrieveDataWithCredential native methods

Crashlytics

  • [android] updated Crashlytics native SDK to v2.9.1

Other

  • [internals] remove bows logger dependency + window shims (fixes #858)
react-native-firebase - v3.2.7

Published by Salakar over 6 years ago

v3.2.7 Changelog

  • Fix #848
react-native-firebase -

Published by chrisbianca over 6 years ago

v3.2.6 Changelog

Remote Config

  • Remove error log from RNFirebaseRemoteConfig #836 @skovhus

Types

Thanks to everybody for the feedback on our flow type changes. We've made a couple of tweaks to prevent internal errors from filtering through to your apps.

react-native-firebase -

Published by chrisbianca over 6 years ago

v3.2.5 Changelog

Types, types and more types

We've added better support for Flow by exporting the following types:

  • Core: App

  • Auth: ActionCodeInfo, ActionCodeSettings, AdditionalUserInfo, AuthCredential, ConfirmationResult, User, UserCredential, UserInfo and UserMetadata

  • Database: DataSnapshot, OnDisconnect, Reference, Query as DataQuery

  • Firestore: CollectionReference, DocumentChange, DocumentListenOptions, DocumentReference, DocumentSnapshot, FieldPath, FieldValue, GeoPoint, Query, QueryListenOptions, QuerySnapshot, SetOptions, SnapshotMetadata and WriteBatch

  • We will add types for the other modules as we tidy them up.

You can import a type by doing the following:

import type { App } from 'react-native-firebase';

Feedback

At the moment, we're building and bundling the Flow types alongside our source code as part of the npm module. This makes it easier to keep up to date, but does cause some issues with different versions of Flow.

Another approach would be to start exporting libdefs to the flow-typed repository. This is a bit more involved and requires that you set up flow-typed in your projects, but would allow us to be a bit more flexible with the flow types and hide some of the internals.

So what do you think? Please let us know over on Discord: https://discord.gg/C9aK28N

react-native-firebase -

Published by chrisbianca over 6 years ago

v3.2.4 Changelog

Admob

  • Fix incorrectly reporting that the admob native module is not installed

Miscellaneous

  • Added some missing auth, core and firestore Typescript typings
  • Updated the flowconfig to hide an uncaught RN type error
react-native-firebase -

Published by chrisbianca over 6 years ago

v3.2.3 Changelog

Auth

  • Breaking Remove undocumented and unusable getCurrentUser - replace with firebase.auth().currentUser instead
  • Add support for languageCode to Auth class #655
  • Add missing createUserAndRetrieveDataWithEmailAndPassword, signInAndRetrieveDataWithCredential, signInAndRetrieveDataWithCustomToken, signInAndRetrieveDataWithEmailAndPassword and signInAnonymouslyAndRetrieveData methods to Auth class.
  • Deprecated The equivalent createUserWithEmailAndPassword, signInAndRetrieveDataWithCredential, signInAndRetrieveDataWithCustomToken, signInAndRetrieveDataWithEmailAndPassword and signInAnonymouslyAndRetrieveData methods have been deprecated and will be removed in a future version.
  • Add missing verifyPasswordResetCode method to Auth class
  • Add missing metadata property to User class
  • Add missing linkAndRetrieveDataWithCredential and reauthenticateAndRetrieveDataWithCredential to User class.
  • Deprecated The equivalent linkWithCredential and reauthenticateWithCredential methods have been deprecated and will be removed in a future version.
  • Add OAuthProvider and OAuthCredential

Core

  • Add missing SDK_VERSION property

Database

  • Fix wrong path being returned by SnapshotReference #679

Firestore

  • Add FieldPath support
  • Fix issues when specifying false query options

Links

  • [ios] Fix possible crash with short links #750
  • [ios] Fix attempting to insert nil #726

Messaging

  • [ios] Fix for show_in_foreground flag #740

Storage

  • [ios] Fix storage compilation warnings #730

Miscellaneous

  • Better Typescript support, including better types for Auth, Firestore and Links. Big thanks to @pheromonez and @danielw93 for their ongoing help here.
  • Validate Typescript files before release #784
  • Various Flow type fixes.
  • Setup Prettier and enable as a pre-commit hook.
react-native-firebase -

Published by chrisbianca almost 7 years ago

v3.2.2 Changelog

IMPROVED - iOS use_frameworks! support

Although use_frameworks! was working in the simplest cases, there were still some issues if it was used in a project that had React installed as a Pod rather than as a linked library.

This release adds some additional search paths to better support this use case. You will also need to make the following changes:

  1. Select the RNFirebase.xcodeproj library in the Xcode navigator
  2. Select the Build Phases tab
  3. Under Link Binary With Libraries, add the Pods_{projectName}.framework file

This will ensure that the Pods are built before react-native-firebase and the headers are available for it to build successfully.

react-native-firebase -

Published by chrisbianca almost 7 years ago

v3.2.0 Changelog

NEW - Crashlytics

  • We now have support for Crashlytics for both android and iOS, check out the docs for more info.

BREAKING - iOS and Cocoapods

Due to changes in React Native 0.50.0, react-native link wasn't working properly with react-native-firebase on iOS (more info here). To resolve these issues we have moved the Podspec file to the ios directory.

If you are using react-native-firebase as a Pod (which is no longer our recommended approach) you will have to update the definition in your Podfile to:

pod 'RNFirebase', :path => '../../ios/RNFirebase.podspec'

NEW - iOS use_frameworks! support

In the past there have been issues with using react-native-firebase when use_frameworks! is set in your Podfile. Going forward, this is now supported but only if have linked using react-native link and not if you are specifying react-native-firebase in your Podfile.

Defining react-native-firebase in your Podfile is no longer our recommended approach, so we suggest you remove references to it from your Podfile and run react-native link react-native-firebase instead.

NOTE: We still recommend installing the underlying Firebase SDKs using Cocoapods as specified in our installation instructions

Auth

Other

  • The location of Typescript typings has been fixed
  • Miscellaneous Flow type fixes

Upgrading from v3.1.x

  • Install latest version from npm / yarn: npm install react-native-firebase@latest
  • iOS:
    • Remove your ios/Pods directory and re-run pod install.
  • Android:
    • Re-build android app via Android Studio or react-native run-android
react-native-firebase -

Published by chrisbianca almost 7 years ago

v3.1.1 Changelog

Auth

  • Fix issue with confirmPasswordReset, applyActionCode and checkActionCode not handling specific app instances
  • Add missing phoneNumber property
  • [ios] updatePassword not correctly using the app instance

Database

  • Add firebase.database.enableLogging
  • Add firebase.database().setPersistenceCacheSizeBytes
  • Make sure the promise is resolved/rejected for transactions

Firestore

  • Add firebase.firestore.enableLogging

Performance

  • Trace incorrectly calling startTraceWithName instead of just traceWithName #593

Misc

  • Add support for using Firebase without Cocoapods (not recommended)
  • Get flow types working again - auth, app and firestore are correctly typed. Other modules may be out of date
react-native-firebase - v3.1.0

Published by Salakar almost 7 years ago

v3.1.0 Changelog

NEW - Dynamic Links

  • We now officially have support for Dynamic Links for both android and iOS, check out the docs for more info. @omer88

Firestore

Storage

Other

We're now on Open Collective - see the readme section for or visit https://opencollective.com/react-native-firebase if you'd like to support ongoing development and maintenance of this library.

Upgrading from v3.0.x

  • Install latest version from npm / yarn: npm install react-native-firebase@latest
  • iOS:
    • Remove your ios/Pods directory and re-run pod install.
  • Android:
    • Re-build android app via Android Studio or react-native run-android
react-native-firebase -

Published by chrisbianca almost 7 years ago

v3.0.6 Changelog

Firestore

  • Use milliseconds for timestamps to resolve timezone issues across both iOS and Android

Database

Auth

  • [ios] Reload the user after updating their profile and email address as the native SDK is not doing it automatically
  • [android] Correctly populate email field for password providers
  • [android] Cache auto-verified phone credential for use on the native side https://github.com/invertase/react-native-firebase/issues/464
  • [android] Correctly populate phone number field for phone auth providers
  • [android] Incorrectly removing all auth listeners when using verifyPhoneNumber
  • [js] Introduce experimental onUserChanged method to simplify integration with React Native

Messaging

  • [ios] Move registerForRemoteNotification to the main thread to prevent XCode 9 warnings

Misc

  • [ios] Centralise event sending to ensure all events validate the bridge before sending
  • Update typings to allow null values to clear Analytics values @YousefED
react-native-firebase -

Published by chrisbianca almost 7 years ago

v3.0.5 Changelog

Firestore

Database

Auth

  • [ios] Reload the user when an account is unlinked as the native SDK is not doing it automatically

Admob

react-native-firebase -

Published by chrisbianca about 7 years ago

v3.0.4 Changelog

Firestore

Database

  • Protect against calling off on a non-existent ref
  • Fix an issue with strict mode violations

Auth

react-native-firebase -

Published by chrisbianca about 7 years ago

v3.0.3 Changelog

Firestore

Misc

react-native-firebase - v3.0.1

Published by Salakar about 7 years ago

v3.0.1 CHANGE LOG

Setup

react-native link is now supported, which means the following:

  • [ios] You can choose not to have React, Yoga, react-native-firebase, etc installed as pods. You do still need to have the Firebase SDKs installed as Pods as recommended by Google.
  • [android] A couple of the manual steps are now automated for you

Check out the new installation guides:

Utils

We've added a new module to contain everything non-firebase specific, things that relate to the library (such as configuration) or using firebase on react native and misc debug helpers.

Accessing the new module can be done via firebase.utils().X or firebase.utils.X for statics.

Play Services

  • [android] Google Play Services checks and utils added. By default an error or warning that looks like these will now display if your android device has a Play Services issue. You can configure this using the api/methods below. @salakar
  • firebase.utils().playServicesAvailability returns an object of type GoogleApiAvailabilityType @salakar
  • setter firebase.utils().errorOnMissingPlayServices set to true or false. Defaults to true, with this enabled a red box Play Services error will appear if the device you're developing your android app on has failed the Play Services checks. You should set this to false in your prod app and handle Play Services checks yourself using the provided apis on utils(). @salakar
  • setter firebase.utils().promptOnMissingPlayServices set to true or false. Defaults to true, with this enabled if a Play Services issue is detected it will automatically attempt to prompt you on screen to update the Play Services app (i.e update dialog with update button) or whatever the possible resolution is. Set to false to disable. @salakar
  • various methods to handle manual Play Services checks for your end users: promptForPlayServices(), resolutionForPlayServices(), makePlayServicesAvailable() @salakar

The old docs for Google Play Services api's can be found here - they generally still stand except for the api now being as above.

See https://github.com/invertase/react-native-firebase/blob/master/lib/modules/utils/index.js for any other undocumented methods.

iOS

Database

Firestore

Misc

A note on docs

We're aware there's a lot of missing docs on the current site and this something we're actively working on improving. We have a brand new work in progress site, it has guides, full api references and more, let us know your thoughts (on discord): https://invertase-default.firebaseapp.com/docs/v3.0.*/getting-started - this is a temporary url. If you'd like to get involved and contribute to the site then please let us know (also on discord).


v3 change log added below for completeness.


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

  • #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 (coming soon):

  • 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: https://github.com/firebase/firebase-ios-sdk/issues/140#issuecomment-315953708
  • 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.
  • [android] no play store/play services version checks and associated methods.
react-native-firebase -

Published by chrisbianca about 7 years ago

Changelog

Storage

  • [ios] Add support for Apple's new HEIC image format in iOS 11. react-native-firebase will convert the image file to a JPEG before uploading to ensure compatibility with non Apple devices.
react-native-firebase -

Published by chrisbianca about 7 years ago

Changelog

Admob

  • [ios] Remove unnecessary import which is incompatible with the latest version of the Google Ads SDK

Messaging

  • [ios] UIApplication methods should only be called from the main thread
react-native-firebase -

Published by chrisbianca about 7 years ago

Changelog

Admob

  • [ios] Add missing files to xcode project #400

Messaging

  • [ios] Set opened_from_tray true if a local notification is clicked from notification center/tray @phips28
react-native-firebase - v2.2.0

Published by Salakar about 7 years ago

  • Backport RN 0.48 support from v3
react-native-firebase -

Published by chrisbianca about 7 years ago

Changelog

  • [ios] Port framework and header search path fixes from v3 to address issue with the latest Firebase Database library
Package Rankings
Top 0.59% on Npmjs.org
Top 8.61% on Pub.dev
Top 9.8% on Proxy.golang.org
Badges
Extracted from project README
badge badge badge badge badge badge badge badge badge badge badge badge badge badge badge badge badge
Related Projects