Reputation: 733
So I have this platform that has many security features that prevent interaction with the Firebase database, because the web version is very prone to tampering. The iOS version cannot interact with the database because of all these security features, as the security bypass functions cannot be called from the iOS end. How do I make it so that the iOS version of my platform can directly interact with the Firebase database? Is it something to do with perhaps authentication or database rules?
Upvotes: 0
Views: 201
Reputation: 1352
Another way in which your iOS version can interact with the database is to make the calls to the database in such a way that your calls abide by the rules.
For example name can only be set to string then in setValue make sure the name is passed as string. Make sure you write where you have write access. Don't try to write where the rule states that only read access is available.
There is no shortcut to write at a read only place unless the rule is changed or removed. If the rules require authentication then first authenticate the user and then try to interact with the db.
Upvotes: 0
Reputation: 208
You need to change the rules of your realtime database follow the steps
Go to your Firebase Console
From Rules change them to :
{
"rules": {
".read": true,
".write": true
}
}
Upvotes: 1