So I import PromiseKit and then try
FIRDatabase.database().reference().child("somechild").removeValue().then {
/////
}
Obviously, this doesn't work and I was wondering what am I missing to make promises work with Firebase, if its even possible. What I'm trying to accomplish is to remove four Firebase references all at once with a single catch method.
With nodeJs I would easily use:
Promise.all ([
someRef.remove(),
someRef.remove(),
someRef.remove(),
someRef.remove()
]).then (function({
}).catch({
//handle error
})
Is there a way to accomplish this in Swift at all?