ios - Firebase Database, permission denied (No rules) swift -
i new app programming. got app work, when try write data firebase gets denied? set rules true can read , write data.
i cant figure out wrong?
2017-09-12 10:52:26.584 smart-app[3232] <warning> [firebase/database][i-rdb038012] setvalue: or removevalue: @ /users failed: permission_denied
i using command write data:
@ibaction func gemkunde(sender: uibutton) { ref?.child("users").setvalue(["fornavn": fornavn.text!]) }
i have imported firebasedatabase , made ref:
ref = database.database().reference()
my rules are:
{ "rules": { ".read": true, ".write": true } }
any ideas?
replace realtime database rules section in firebase
{ "rules": { ".read": true, ".write": true, "users":{ ".read": true, ".write": true, } } }
and not forget click on publish button.
note: heppens because of using wrong configuration file
googleservice-info.plist
please checkdatabase_url
,other data , updategoogleservice-info.plist
reference:https://firebase.google.com/docs/database/security/
Comments
Post a Comment