I am using IOS BACKGROUND FETCH n BACKGROUND TRANSFER to update our application.
When we download MP4 as part of a large download of a large number of files, the download may suddenly stop and receive an error message:
'The client closed the connection before receiving the entire response
http code is another 200.
We do not have data restrictions due to corporate cellular accounts and there are separate applications on our iPad, so management wants us to download more data and files in 20-30 days on a clean installation. These are corporate videos / pdf published daily.
I created NSURLSession
NSURLSession * backgroundSession_ = [NSURLSessionConfiguration backgroundSessionConfigurationWithIdentifier:identifier]
Then for each url for mp4 or pdf I create an NSURLSessionDownloadTask from my NSURLSession
NSURLSessionDownloadTask * downloadTask_ = [backgroundSession_ downloadTaskWithURL:url_];
Resume failed on every download task. When everything returns, the NSURLSession ends, and I inform the user that the applications have been updated.
I use CHARLES PROXY on my Mac to track downloads. This takes some time, as there are a lot of files, and I noticed that movies seem to be streams, so they can be slow. Usually it checks what has been downloaded, and only downloads the latest ones, but if I do a lot of downloads, I will say that this is a clean installation, I noticed that quiet streams in mp4 often kill. They have a code of 200, but with a message
'The client closed the connection before receiving the entire response
, , NSURLSession , .
: : : 200: Complete

: :


: Background Fetch, , - iOS8 .
tmp mp4
[session finishTasksAndInvalidate]
, , .
, .