How do you execute a completion listener for firebase in swift? It says there are completion listers for SetValue and UpdateValue in the docs but there is no example.
An example of using completion handler for setValue in firebase is given below. Similarly you can use completion handler for methods.
func saveJob(completion:(Bool)-> Void) {
FIRDatabase.database().reference().child("Job").setValue(["Title":self.title!,"Detail":self.details!], withCompletionBlock: { (error, ref) in
debugPrint("Completed")
completion(true)
})
}