Task completion — applications can ask the system for extra time to complete a given task.
I am using this method for Task Completion,
- (void)applicationDidEnterBackground:(UIApplication *)application
{
UIApplication *app = [UIApplication sharedApplication];
bgTask = [app beginBackgroundTaskWithExpirationHandler:^
{
NSLog(@"This is Testing");
[app endBackgroundTask:bgTask];
bgTask=UIBackgroundTaskInvalid;
}];
}
But i am not getting any output from this method. Anyone tell me, what i am doing wrong.Can you tell any best method to implement for the task completion.
Regards,
Arunkumar.P