Reputation: 3956
I tried ASIHttpRequest to download a file, but when the app enter background, it would stop downloading seconds later, is there any way to download a file completely in background?
Upvotes: 2
Views: 466
Reputation: 3089
You have to set the download request to be able to continue in background.
[self.downloadRequest setShouldContinueWhenAppEntersBackground:YES];
self.downloadRequest is the ASIHTTPRequest, so just replace that with yours, add this line after you init it, and then it will continue in background:]
Upvotes: 4