I want to upload and download large files to or from a server from an iOS application under the following conditions.
1) If my application goes into the background, it should download and download it.
2) If I lost the connection, then it should stop any progressive download and download, and then can go back where it stopped from.
3) If I close the application from the tray, it will follow it at the second point when the application restarts.
I really want to know if this is possible with NSURLConnection ?
I am very familiar with the ASIHttpRequest and AFNetworking libraries, I do not want to use any external libraries, instead I want to use the default NSURLConnection for the same.
I can download and upload using NSURLConnection if its connection is permanent and the application is running in the background.
I thought of the third case:
If the application is terminated, then I will need to download or download the progress somewhere, so next time I need to send "Range" to continue downloading.
But I'm not sure how it will handle the server itself? How to configure the server for this? How to set up a web service for this? Any ideas?
source share