Getting Started With PromiseKit | raywenderlich.com

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.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/9208-getting-started-with-promisekit

Thanks for the tut, @owenb. Very useful. will definitely give it a try.

@awaisfayyazbp Really glad you like it. Cheers! :]

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 Can you please help with this when you get a chance? Thank you - much appreciated! :]

@shogunkaramazov @owenb
Wow thanks for the fast reply, I already found the solution though.

I didn’t open the workspace but the project file. I am newbie and wasn’t aware what a workspace was. C:

starrider64 glad you got it going!

@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

Hi bar.wol,
I don’t know of a way to cancel race within PromiseKit, but did come across an extension to PromiseKit that handles it.
Checkout: GitHub - johannesd/CancellablePromiseKit: Extends the amazing PromiseKit to cover cancellable tasks.

You guys should remove the links to PromiseKit dot org which is now a spammy blog that has nothing to do with PromiseKit

*doing my best to not give them another link from this forum :slight_smile:

@owenb Do you have any feedback about this? Thank you - much appreciated! :]

Hey thanks ckbrown for the heads up!
We will get the links changed to https://github.com/mxcl/PromiseKit/tree/master/Documentation.

This tutorial is more than six months old so questions are no longer supported at the moment for it. Thank you!