I have big trouble with NSURLSession when i'll terminate the App. I have downloaded the apple sample: https://developer.apple.com/library/ios/samplecode/SimpleBackgroundTransfer/Introduction/Intro.html
on Apple reference.
When i start download the file download correctly. When i enter in background the download continues to. When i terminate the application and i restart the app the application enter in:
- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCompleteWithError:(NSError *)error
And i catch this error:
The operation couldn't be completed. (NSURLErrorDomain error -999.)
It seems that i cannot restore download when app has been terminated. It's correct?For proceed with download i must leave application active in background?
Thank you Andrea
error: Error Domain=NSURLErrorDomain Code=-1000 "bad URL" UserInfo=0xc7844f0 {NSUnderlyingError=0xc634c90 "bad URL", NSLocalizedDescription=bad URL} data: <> response: (null)
.you get this kind of error? or still -999? – Kktp