Sunday, April 30, 2017

Resume download after killing or putting on background the application

Leave a Comment

I have some issues when I want to resume a download operation. I am using Alamofire 4.4 and I made my tests on iOS 9 and 10. Here is my use cases:

1- A download operation is in progress, I cancel the request (resumeData is generated and saved) and then I put the application on background. After relaunching the application, I resume the download (using the resumeData) some times the download is being resumed and sometimes is being restarted. Is it a normal behaviour ? And are there any solution if not ?

2- A download operation is in progress, and i kill the application. Downloaded data seems to be lost and I can't resume the download. Is there any solution to get the resumeData and resume the download after restarting the application ?

Thank you.

1 Answers

Answers 1

This may not be a direct answer for your question but you should definitely check those: http://benscheirman.com/2016/09/designing-a-robust-large-file-download-system/ and http://benscheirman.com/2016/10/background-downloads/

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment