Skip to content

Commit 64a1c20

Browse files
committed
Integrate Latest @ 217918919
Changes to database/testapp ... - Add database rules to Desktop setup. CL: 217918919
1 parent 795ab26 commit 64a1c20

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

database/testapp/readme.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,28 @@ Building and Running the testapp
151151
- Register your app with Firebase.
152152
- Create a new app on the [Firebase console](https://firebase.google.com/console/),
153153
following the above instructions for Android or iOS.
154+
- The Desktop version of the library requires you to set up any keys you
155+
use via Query::OrderByChild() in advance. Add this to your database's
156+
rules in the _Rules_ tab of your database settings in Firebase console:
157+
```
158+
{
159+
"rules": {
160+
// Require authentication for writing to the database.
161+
".read": "true",
162+
".write": "auth != null",
163+
// Set up entity_list to be indexed by the entity_type child.
164+
"test_app_data": {
165+
"$dummy": {
166+
"ChildListener": {
167+
"entity_list": {
168+
".indexOn": "entity_type"
169+
}
170+
}
171+
}
172+
}
173+
}
174+
}
175+
```
154176
- If you have an Android project, add the `google-services.json` file that
155177
you downloaded from the Firebase console to the root directory of the
156178
testapp.

0 commit comments

Comments
 (0)