We have an application that downloads user contents. Our files could be big ones and usually our users download as batch. Our users having different troubles on download that described below. We want to refactor whole download process and possible use a library for that. We would like your opinion on problems and solutions.
Current Process:
We have list of items, which users can download, each item consists of a single file or multiple files (users don’t aware of that). User can initiate download of an item by pressing the “download button” on the list, and we support concurrent download of items. Remember each item can have multiple files or single file. We also need to show progress of download for items individually. We are using NSURLConnection to download files it was developed since iOS 4.
Problems:
- During download if there is a network glitch or some unknown reasons download gets stuck.
- During download lost some data of the file
- Having trouble to download in the background (We have to keep screen awake for example to make download continue etc. since it was developed on iOS 4)
- There is no file integrity check when download is finished
- Resume Download
What we need:
- Download big files as batch, usually 10 to 50 files, size around 10 to 200 MB of each file
- Pause when there is a connection problem (lost, troubled/deadly slow), auto resume when connection is back
- Download in the background (app suspended or closed)
- Resume download in background when app is crashed or terminated
- Pause, Cancel of Downloads by User
- Integrity check when download is complete
- Integrity check while download is in progress (on downloaded parts), auto re-download bad parts before download completes
- Getting progress info (list of downloads, downloaded ones, percentage of download, estimated time of complete, download speed etc.)
- Multiple threads to fast download
- Support from iOS 7 to Later
In which solution we can make sure each of our needs covered? How can we achieve this?