The problem here is with the block at the end of this line:
databaseRef.child("Users").queryOrderedByKey().observeSingleEvent(of: .childAdded) { (snapshot) in }
since there are many implementations of the observeSingleEvent function, the compiler becomes a observeSingleEvent one to choose.
Decision:
databaseRef.child("Users").queryOrderedByKey().observeSingleEvent(of: .childAdded, with: { snapshot in
Hope this helps someone
source share