Re: Questions about uploading files via background NSURLSession
Re: Questions about uploading files via background NSURLSession
- Subject: Re: Questions about uploading files via background NSURLSession
- From: "Quinn \"The Eskimo!\"" <email@hidden>
- Date: Tue, 03 Feb 2015 20:47:13 +0000
On 3 Feb 2015, at 19:38, Rick Mann <email@hidden> wrote:
> Can I prioritize in the same way with background NSURLSessions?
Starting with iOS 8 and OS X 10.10, yes. NSURLSessionTask has a "priority" property that lets you hint as to which tasks should run first.
> Obviously, I could wait until NSURLSession tells me it has finished one upload before I start the next [...]
Don't do that, at least on iOS, lest you be hit by the resume rate limiter.
<https://devforums.apple.com/message/938057#938057>
> (shouldn't I give all the files to NSURLSession all at once, to ensure they're all available for background uploading)?
Yes.
> Will the system take care of limiting how many it uploads at a time to maximize throughput?
Yes.
> Will it upload them in the order I presented them?
Kinda, but its better to be explicit about this via the "priority" property.
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