2
如何在我的swift代碼中檢查「permission_denied」?!以便我可以向用戶顯示正確的警報?如何檢查Firebase權限是否被拒絕?
self.ref = Database.database().reference(withPath: "PlayerBoxes")
//
handle = ref.child(pID).observe(.value, with: { snapshot in
// Do Something
}) { (error) in
print(error.localizedDescription)
}
// Update info into Firebase, do not overwrite entire node
ref.child(self.pID).updateChildValues(sqr.toDictionary()) <-- Permission Denied
請接受我的回答作爲答案,因爲它解決了您的問題,並且您的問題被關閉。快樂編碼:) – eshirima