• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Background tasks completing without notification
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Background tasks completing without notification


  • Subject: Re: Background tasks completing without notification
  • From: Scott Hancher <email@hidden>
  • Date: Wed, 05 Mar 2014 11:34:36 -0800

NSURLSession's finishTasksAndInvalidate was causing me issues with a previous problem, but that's been resolved. Just to make sure though I commented out calls to finishTasksAndInvalidate and NSURLSessionTask's cancel, and the problem still occurs.

My current observations are that the task has completed, since -getTasksWithCompletionHandler: returns 0 tasks. Due to a race condition, I've relaunched our app before NSURLSession's background task has gotten around to relaunching it. At this point, I need a callback from the session/task to notify me of this completion; otherwise, I have no means to determine the result of the completed task. I'm expecting to get this callback to my delegate on the NSURLSession recreated on relaunching my app and assigned through the method +sessionWithConfiguration:delegate:delegateQueue:. I do get the callback -URLSession:task:didCompleteWithError: some of the time, but it's not 100% reliable.

I am testing this on the simulator, so suggestions on exploring it further are certainly welcome.

Thank you for the detailed response and related posts. I did read through them, but gleaned no further course of action to take on my problem.

++Scott.

 _______________________________________________
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

References: 
 >Background tasks completing without notification (From: Scott Hancher <email@hidden>)
 >Re: Background tasks completing without notification (From: "Quinn \"The Eskimo!\"" <email@hidden>)

  • Prev by Date: Re: Background tasks completing without notification
  • Next by Date: Obtaining NIC driver name from socket FD
  • Previous by thread: Re: Background tasks completing without notification
  • Next by thread: Obtaining NIC driver name from socket FD
  • Index(es):
    • Date
    • Thread