ios - compile error on FirebaseHandle -


i got compile error when tried keep reference handled returned observeeventtype call suggested in firebase ios doc

firebasehandle = messagesref.observeeventtype(feventtype.childadded, withblock: { (snapshot) in 

error is:

cannot assign value of type 'uint' value of type 'firebasehandle!' 

this code firebase doc trying follow:

var handle = ref.observeeventtype(.value, withblock: { snapshot in     println("snapshot value: \(snapshot.value)") }) ref.removeobserverwithhandle(handle) 

what missing?

the method observeeventtype returns uint ( uint8 ). firebasehandle variable should defined :

var firebasehandle: uint8 = 0 

hope helps.


Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -