[英]Can't get permission to firebase database IOS
I can't get permission to database. 我无法获得数据库的许可。
In xcode console I am getting this message: 在xcode控制台中,我收到此消息:
[Firebase/Database][I-RDB038012] Listener at /skelbimai failed: permission_denied [Firebase /数据库] [I-RDB038012] / skelbimai的监听器失败:permission_denied
So I went to firebase database, then Rules and changed like this: 所以我去了firebase数据库,然后规则和改变如下:
service cloud.firestore {
match /databases/{database}/documents {
match /{document=**} {
allow read, write;
}
}
}
And still I cant read write from database. 而且我仍然无法从数据库中读取写入内容。 Where I missed something? 哪里错过了什么?
The rules you changed are the rules for Cloud Firestore, while the error message is coming from the Firebase Realtime Database. 您更改的规则是Cloud Firestore的规则,而错误消息来自Firebase实时数据库。
You'll need to switch your console from the Realtime Database to Firestore. 您需要将控制台从实时数据库切换到Firestore。 To do so: 为此:
Go to the Firebase database console 转到Firebase数据库控制台
Select Realtime Database 选择实时数据库
From here on the console will stick to showing the realtime database, unless you switch again. 从这里开始,控制台将坚持显示实时数据库,除非你再次切换。
If you already have the console open on one database, you can switch to the other by clicking on the dropdown next to Database and selecting the database you want to manage: 如果您已在一个数据库上打开控制台,则可以通过单击“ 数据库”旁边的下拉列表并选择要管理的数据库来切换到另一个数据库:
To grant full access to anyone, use these rules: 要授予任何人完全访问权限,请使用以下规则:
{
"rules": {
".read": "true",
".write": "true"
}
}
Please only use this for early development stages, as having your entire database publicly read-and-writeable makes it very easy to abuse. 请仅在早期开发阶段使用此功能,因为将整个数据库公开读写可以很容易地被滥用。
Try Following 试试以下
Goto Database -> Rules
then 转到Database -> Rules
然后Database -> Rules
copy and paste it 复制并粘贴它
{
"rules": {
".read": "true",
".write": "true"
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.