TaskQueue (Swift) for iOS

Download Source

Powered by Appetize.io.

A great Swift class for managing asynchronous tasks that need to execute one after another. You just add tasks (as closures) to the queue and the queue takes care to execute them in the proper order.

As a bonus TaskQueue just makes using Grand Central Dispatch in Swift very very easy.

This is very useful for the cases you need to make a call to your API to fetch some data and then use the data to make another network call to perform a different operation. With TaskQueue this is very easy because you just schedule the network calls and the second one executes only when the first one has completed - and it's also very easy to pass data from the first to the second one.

The GitHub repo contains detailed code example, so just head there and read trough the example.

Sponsored with ❤️ by Instabug
Why do mobile-first companies choose Instabug over Crashlytics
Instabug

Instabug helps you identify and resolve severe crashes quickly. You can retrace in-app events and know exactly which line of code caused the crash along with environment details, network logs, repro steps, and the session profiler. Ask more questions or keep users up-to-date with in-app replies straight from your dashboard. We take data privacy seriously, so no one sees your data but you!