Monika Patel
Monika Patel

Reputation: 2375

Is it possible to continue download file after app terminate from background

I want to continue download file when user terminate application from background. I'm using Heikowi/HWIFileDownload this demo. This is demo link which I'm used : https://github.com/Heikowi/HWIFileDownload In this demo work perfactly

  1. Download file in background foreground.
  2. Pause and resume downloading file.
  3. Resume downloding after app remove from background.

But I want to continue the download file, if user killed application from background.

enter image description here

Upvotes: 1

Views: 2277

Answers (3)

nsinvocation
nsinvocation

Reputation: 7637

If the user removes app from the background, system won't wake it up to allow app to continue downloading.

Updated

App is woken up only if it was terminated or suspended by the system. This is not the case when user does this. Apple considers that if user kills app, he doesn't want it to be running anymore.

Upvotes: 4

Hemang
Hemang

Reputation: 27050

The author of the HWFileDownload is already said is not possible.

https://github.com/Heikowi/HWIFileDownload#force-quit

As said by other answers you need to do it by your self, if your webserver allowed to resume download then you can continue with the downloading.

Upvotes: 0

heximal
heximal

Reputation: 10517

If web server supports Partial content and you implement proper business logic, then it's more than possible

Upvotes: 0

Related Questions