Releases: invertase/react-native-firebase
v1.1.1
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
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
- [both] fetchProvidersForEmail():
Promise<Array<String>>
implemented
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 ofprovider
whilst obtaining auth credentials. The latter will be removed in future releases. - [deprecated] Deprecated
User.getToken
in favour ofUser.getIdToken
. - [breaking]
User.reauthenticate
has been removed in favour ofUser.reauthenticateWithCredential
. - [breaking]
User.link
has been removed in favour ofUser.linkWithCredential
. - [breaking] Removed unnecessary
didReceiveNotificationResponse
andwillPresentNotification
methods for iOS messaging. Added additionaldidReceiveRemoteNotification
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
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
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
andendtAt
query modifiers. 7c9b094 - [android] fixed type conversion issue with
limitToLast
query modifier.b462200
Test app
v1.0.0-alpha13
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
Changelog
- [js][ios][messaging] fixed misc messaging .send() type errors
1.0.0-alpha11
1.0.0-alpha10
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
Changes
Big feature landed, brace yourself...
Transactions
- Implemented transaction support for both android and ios platforms.
1.0.0-alpha8
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 tofirebase.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
tofirebase.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.