Re: Out of process download support
Re: Out of process download support
- Subject: Re: Out of process download support
- From: "Quinn \"The Eskimo!\"" <email@hidden>
- Date: Sat, 22 Feb 2014 12:42:04 -0800
On 21 Feb 2014, at 16:21, Scott Hancher <email@hidden> wrote:
> However, I never seem to be getting a call to NSURLSessionDelegate's URLSessionDidFinishEventsForBackgroundURLSession: [...]
You should be getting that. I'd rather spend time figuring out why you don't get it than investigating potential workarounds.
Check that you've spelt -URLSessionDidFinishEventsForBackgroundURLSession: correctly. I know it sounds silly, but I've been bitten by such bugs before.
When you get launched and 'handleEventsForBackgroundURLSession' is called, after creating the session call -getTasksWithCompletionHandler: to check that there's no unexpected tasks in your session and to check on the state of your expected tasks.
Make sure you call the completion handler passed to this method on the main thread. It's easy to call it on a secondary thread, and bad things happen if you do.
Run the Simple Background Transfer sample to verify for yourself that the method can actually get called.
Share and Enjoy
--
Quinn "The Eskimo!" <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden