Actually thank you so much for helping me solve a problem I've had for a couple of days now. However I am using realtime database for my app so if there's anyone wondering how to replace the "db" and ".collection" here's what to replace the segment with. Code below ---------------------------------------------------------- let data: [String: Any] = [ "username": username, "email": email, "password": password ]
let db = Database.database().reference().child("users").child(resultUser.uid) db.setValue(data) { error, _ in if let error = error { completion(false, error) return } completion(true, nil) }
excited for NodeJS part
Actually thank you so much for helping me solve a problem I've had for a couple of days now. However I am using realtime database for my app so if there's anyone wondering how to replace the "db" and ".collection" here's what to replace the segment with.
Code below ----------------------------------------------------------
let data: [String: Any] = [
"username": username,
"email": email,
"password": password
]
let db = Database.database().reference().child("users").child(resultUser.uid)
db.setValue(data) { error, _ in
if let error = error {
completion(false, error)
return
}
completion(true, nil)
}
thanks for great tutorial!
thanks a lot!!
Firestore Database -> Rules, need change false to true