• 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: "Quinn \"The Eskimo!\"" <email@hidden>
  • Date: Tue, 22 Jul 2014 17:20:22 +0100

On 22 Jul 2014, at 17:09, Shawn Erickson <email@hidden> wrote:

> In my experience you just create multiple session objects per thing needing tasks executed.

That's not the way the API was intended to be used.  The idea is to use your session object to group your requests logically.  For example, this makes it easy to set your user agent string in one place.

There are situations where I've needed to explicitly demultiplex the NSURLSession delegate callbacks but in general I've found that I like having the delegate callbacks funnelled into one place.  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.

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


  • Follow-Ups:
    • Re: 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>
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>)

  • 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: Re: NSURLSessionTasks don't have their own delegates?!
  • Index(es):
    • Date
    • Thread