Sam
Sam

Reputation: 145

Value Type of 'FIRDatabaseReference' has no member 'observeSingleEvent'

I have received the error of "Value Type of 'FIRDatabaseReference' has no member 'observeSingleEvent'" in my firebase app. I found this code on the firebase website but unfortunately it is not working in my app. I am writing the code to my app in Swift 3 and am wondering if this could possibly be the problem.

Thanks ERROR IMAGE

Upvotes: 2

Views: 682

Answers (1)

Dravidian
Dravidian

Reputation: 9945

Try :-

ref.observeSingleEventOfType(.Value, withBlock : {(snapShot) in 

  print(snapShot)  

    })

What you are using is a syntax to Swift3

Upvotes: 4

Related Questions