Reputation: 327
I have some data stored on firebase and when somebody adds to my data, through my app I want to receive and update my data. I looked at the google docs and it said to something like this...
databaseRef.child("Leaderboard").queryOrderedByKey().observe(.childChanged, with: {
snapshot in
let value = snapshot.value as? NSDictionary
// put data into variables
let playerName = value?["playerName"] as! String?
}
But for some reason it returns nil, I know I have my hierarchy right. Why is it returning nil?
Upvotes: 0
Views: 755