lundi 23 mars 2015

How to Execute a task continuously when application is in Background state in iOS 8

I Write the below code for executing a task when application is in background state it is working fine in iOS 7 but it is not working in iOS 8. Can someone give me solution to execute a task continuously in iOS 8 when application is in background state.



- (void)applicationDidEnterBackground:(UIApplication *)application
{
UIApplication *app = [UIApplication sharedApplication];
UIBackgroundTaskIdentifier bgTask;
bgTask = [app beginBackgroundTaskWithExpirationHandler:^{
[app endBackgroundTask:bgTask];
}];
}



Aucun commentaire:

Enregistrer un commentaire