From 6b9c34a881e42b025924657a36e1924dcdef13a1 Mon Sep 17 00:00:00 2001 From: Chris Bianca Date: Mon, 31 Jul 2017 10:36:16 +0100 Subject: [PATCH 1/3] 2.0.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8875b26d..78d6a20b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-firebase", - "version": "2.0.4", + "version": "2.0.5", "author": "Invertase (http://invertase.io)", "description": "A well tested, feature rich Firebase implementation for React Native, supporting iOS & Android. Individual module support for Auth, Database, Messaging, Remote Config, Storage, Admob, Analytics, Crash Reporting, and Performance.", "main": "index", From 44c0446f59d07db600b6567b3daa7cf6feb6d4ad Mon Sep 17 00:00:00 2001 From: Ben Styles Date: Mon, 31 Jul 2017 12:17:40 +0100 Subject: [PATCH 2/3] Added info about security rules --- docs/modules/database.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/modules/database.md b/docs/modules/database.md index 4cb0a302..64610e3d 100644 --- a/docs/modules/database.md +++ b/docs/modules/database.md @@ -192,3 +192,13 @@ const ref = firebase.database .child('roomId'); ref.keepSynced(true); ``` + +#### Security rules and offline persistence + +Bear in mind that security rules live on the firebase server and **not in the client**. In other words, when offline, your app knows nothing about your database's security rules. This can lead to unexpected behaviour, which is explained in detail in the following blog post: https://firebase.googleblog.com/2016/11/what-happens-to-database-listeners-when-security-rules-reject-an-update.html + +Some examples of behaviour you may not expect but may encounter are: + +- Values that should not be readable, according to your security rules, are readable if they were created on the same device. +- Values are readable even when not authenticated, if they were created on the same device. +- Locations are writable even when they should not be, according to your security rules. This is more likely to cause unwanted behaviour when your app is offline, because when it is *online* the SDK will very quickly roll back the write once the server returns a permission error. From 989396131c2724095bdf0ce5c422a3cbcf4baf4b Mon Sep 17 00:00:00 2001 From: Elliot Hesp Date: Tue, 1 Aug 2017 12:36:40 +0100 Subject: [PATCH 3/3] Update cloud-messaging.md --- docs/modules/cloud-messaging.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/modules/cloud-messaging.md b/docs/modules/cloud-messaging.md index 72a490d4..fd5f489f 100644 --- a/docs/modules/cloud-messaging.md +++ b/docs/modules/cloud-messaging.md @@ -10,6 +10,8 @@ Badge notification is well known on the iOS platform, but also supported by diff This library uses the [ShortcutBadger](https://github.com/leolin310148/ShortcutBadger) library to set the badge number also on Android. A list of supported launcher can be found there. +!> [iOS] Please note: In order for iOS devices to receive Cloud Messages, ensure you [request permissions](http://invertase.io/react-native-firebase/#/modules/cloud-messaging?id=ios-requestpermissions). + ## API ### subscribeToTopic(topic: string)