SKTaskManager for iOS

Now its easy to manage asynchronous task whether its is sequential or parallel. Create SKTask as many as your async task you have (i.e. if you want to download 5 images asynchronously, then create 5 SKTasks)

SKTask *aTask=[SKTask taskWithBlock:^(id result, BlockTaskCompletion completion) {
    // your async task goes here i.e. image downloading in background
    // once task is completed call this block

    //completion(nil); //this is important otherwise next task will not be exexute

Now add all SKTasks to array and call this method to perform task parallel. (i.e. All 5 images should start downloading at same time)

[SKTaskManager parallerOperations:arrTask completion:^{
    NSLog(@"all task completed");

Call this method to perform task sequentially. (i.e. only one image should be downloaded at a time. once its finish then next should start)

[SKTaskManager sequenceOperations:arrTask completion:^{
    NSLog(@"all task completed");
Sponsored with ❤️ by Instabug
Instabug: Understand how your app is doing with real-time contextual insights from your users

Get all the logs you need and fix bugs, crashes, and other issues in minutes instead of days. With Instabug you will automatically receive device data, network logs, and reproduction steps with every bug and crash report. It only takes a line of code to integrate and is perfect for teams that are now working remotely. See more detailed features comparison and try Instabug for free here.