How to resume downloading after the user closes the application, and not just put it in the background?
My code looks like to start the download initially, I want to be able to identify here if the problem can be resumed.
NSMutableURLRequest *nkRequest = [NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringLocalAndRemoteCacheData timeoutInterval:30.0]; NKLibrary *library = [NKLibrary sharedLibrary]; NKIssue *issue = [library addIssueWithName:[downloadInfo objectForKey:kPackageID] date:[NSDate date]]; [[NKLibrary sharedLibrary] setCurrentlyReadingIssue:[[NKLibrary sharedLibrary] issueWithName:[downloadInfo objectForKey:kPackageID]]]; NKAssetDownload *asset = [issue addAssetWithRequest:nkRequest]; [asset setUserInfo:[NSDictionary dictionaryWithObjectsAndKeys:info,@"info", nil]]; [asset downloadWithDelegate:self];
source share