I am trying to process method asynchronously, as per requirements, once the first method has completed, only then the second method should start executing. The Problem is first
Dispatch a Single Queue and call your Methods in order
dispatch_group_async(group, queue, ^{
[self firstMethod];
NSLog(@"firstMethod Done");
[self secondmethod];
});
Or you might dispatch a group of 3 concurrent queues(This is a Wild guess)
You can use a completion block. You just need to modify firstMethod this way:
- (void)firstMethodWithOnComplete:(void (^)(void))onComplete {
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
//processing here.....
onComplete();
});
}
And then use it this way:
[self firstMethodWithOnComplete:^{
[self secondMethod];
}];