在firebase中,我试图通过使用childByAutoID()来检索存储在firebase实时数据库中的数据,以便为数据提供唯一标识符,但问题是我不完全确定如何实现这一点?
func retData(){
rootRef.child("users").child(userID).ChildByAutoID().observeEventType(.Value){
(snap: FIRDataSnapshot) in
self.simpleLabel.text = snap.value?.description
}
}
Json数据结构
-userID
-childByAutoID
-player1
-email
答案 0 :(得分:1)
如果您的JSON结构是: -
Tools -> Internet Options > Advanced > Security Section >
Uncheck Check for publicher's certificate revocation
AND
Uncheck Check for server certificate revocation
使用: -
-users
-childByAutoID
-playerID
-email