我正在尝试创建一个iOS应用程序,根据他们输入的性别将男孩和女孩分别存放在firebase中。但是在下面的代码中,当我尝试创建一个节点时,它只会创建它,如果我将ref的子名称为“users”,否则不起作用。
let ref = FIRDatabase.database().reference()
//makes a child of ref called user
let usersReference = ref.child("users") //PROBLEM IS HERE, IF I NAME IT ANYTHING OTHER THAN USERS, IT DOES NOT SAVE IN THE DATABASE
let uid = user?.uid
let newUserReference = usersReference.child(uid!)
newUserReference.setValue(["email": self.emailField.text!])