將在用戶ID數據我想在火力地堡各自的用戶ID的註冊用戶添加數據,但它給了我錯誤「unexpectedly found nil while unwrapping an optional value
」現在我不知道問題出在哪兒。但是當我分別使用代碼userID
而不是ref
時,數據被成功添加。但是當我添加userID
以下ref
然後出現錯誤。錯誤而在火力地堡斯威夫特3
註冊
let userID = FIRAuth.auth()?.currentUser?.uid
ref.child("user_registration").child(userID!).setValue(["username": self.fullName.text, "email": self.emailTextField.text,"contact": self.numberText.text, "city": self.myCity.text, "state": self.countryText.text, "gender": genderGroup, "blood": bloodGroup])
接受的答案請 –
@VladPulichev還在尋找一個答案,因爲數據不被存儲在一個UID如我所料 –
哪些錯誤ATM? –