Asynchronous programming can be a real pain and can easily result in messy code. Fortunately for you, there’s a better way using promises & PromiseKit on iOS.
When I tried to build the finished project it says: “No such module ‘PromiseKit’”.
I am looking for a solution, but just saw that you answered 16 min ago for a chance to go the easy way on this. (=
@owenb Thank for this tutorial, it’s great!
At the end of your article, you said: “Also note that all of the promises will still resolve, so there are still five network calls, even though you only care about one.” regarding calling race with an array of promises.
Do you happen to know how to handle cancelling the remaining promises after the first one fulfils?
Thanks