• 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: NSURLSessionTasks don't have their own delegates?!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSURLSessionTasks don't have their own delegates?!


  • Subject: Re: NSURLSessionTasks don't have their own delegates?!
  • From: Jens Alfke <email@hidden>
  • Date: Tue, 22 Jul 2014 10:15:57 -0700


On Jul 22, 2014, at 9:20 AM, Quinn The Eskimo! <email@hidden> wrote:

In my experience my app already has an object that it's using to track a particular request but only a small subset of the actual NSURLSession delegate callbacks need to make it to that object.  For example, I typically want to centralise my handling of authentication challenges.

I agree that it’s nice for the session to have a delegate so it can handle shared things like auth. But the core delegate calls for receiving responses / data / errors have to be mapped to individual per-request objects, so it seems like the API is forcing the app to create and maintain something like an NSMutableDictionary that maps taskIdentifier numbers to app objects. That’s a design smell, to me.

—Jens
 _______________________________________________
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: 
 >NSURLSessionTasks don't have their own delegates?! (From: Jens Alfke <email@hidden>)
 >Re: NSURLSessionTasks don't have their own delegates?! (From: Shawn Erickson <email@hidden>)
 >Re: NSURLSessionTasks don't have their own delegates?! (From: "Quinn \"The Eskimo!\"" <email@hidden>)

  • Prev by Date: Re: NSURLSessionTasks don't have their own delegates?!
  • Next by Date: Re: NSURLSessionTasks don't have their own delegates?!
  • Previous by thread: Re: NSURLSessionTasks don't have their own delegates?!
  • Next by thread: WiFi channel separation
  • Index(es):
    • Date
    • Thread