Possible Duplicate:
Download in background in iPhone
I'm downloading a file in my app, using connection:didReceiveData:
in NSURLConnectionDelegate
. If I press the home button then the download is stopped. The delegate is not getting called to receive data.
When the app goes to the background, the app must continue downloading the file. How can I implement this?
There is a method beginBackgroundTaskWithExpirationHandler:
to start a finite-length task in background, is that what I need?