I'm currently working on replacing ASIHTTP code with AFNetworking. I have a scenario where I have multiple files to synchronize with the server. I want this task to continue in the background and I have noticed that the download is progressing when I'm in the background. I'm just curious and confused if I need to do any additional calls to support background downloading.
I found the following on a thread.
__block UIBackgroundTaskIdentifier backgroundTaskIdentifier = [application beginBackgroundTaskWithExpirationHandler:^(void) {
[application endBackgroundTask:backgroundTaskIdentifier];
[[NordecaAFAPIClient sharedClientWithBaseURL:[ECUserDefaults getNordecaApiURL]].operationQueue cancelAllOperations] ;
}];
What do I really require to write in order to support background dowloading?
The other question I have is that what is meant by the shouldResume flag found in the AFDownloadRequestOperation
?