Posts

Post not yet marked as solved
4 Replies
1.9k Views
I wrote an app which uses NSURLSessionDownloadTask in a background NSURLSession to download a portion of a big file, for example 100MB out of a 1GB file, by setting HTTP Range header in NSMutableURLRequest.The task is created correctly and countOfBytesExpectedToReceive is correct and represents the requested range and the task would be completed usually but sometimes in an unknown circumstances (I guess occasionally when a task is moved to a new session with same background identifier), from a point onward the Range header will be discarded and task would begin to download entire file, albeit corrupted, and countOfBytesExpectedToReceive would be reset to the size of entire file.I don't know whether it's my fault or it's a problem within framework itself, but I hope anybody here can help me to solve this problem.
Posted
by alit.
Last updated
.