Re: NSURLSessionTasks don't have their own delegates?!
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