I am new to app programming. I finally got my app to work, but when I try to write data to firebase it gets denied? I even set the rules to true so that anyone can read and write data.
I cant figure out what is wrong?
2017-09-12 10:52:26.584 Smart-app[3232] [Firebase/Database][I-RDB038012] setValue: or removeValue: at /users failed: permission_denied
I am using this command to write data:
@IBAction func GemKunde(sender: UIButton) {
ref?.child("users").setValue(["Fornavn": Fornavn.text!])
}
I have imported FirebaseDatabase and made a ref:
ref = Database.database().reference()
My rules are:
{
"rules": {
".read": true,
".write": true
}
}
Any ideas?