Just an additional update on what I suggested earlier:
I whipped up a quick prototype for my suggestion. Beyond “no special support 
for UDP”, iOS actively refuses to do anything but HTTP/S in a 
background-configured NSURLSession (even while it is in the foreground). This 
means that custom protocols are not supported in the fully above board NSURL 
background stack, and you’ll need to use the less flexible 
-beginBackgroundTaskWithName:expirationHandler: mode.

— adam


On Friday, September 11, 2015 at 3:35 AM, Quinn "The Eskimo!" wrote:

>  
> On 11 Sep 2015, at 00:32, Michael Brian Bentley <bent...@crenelle.com 
> (mailto:bent...@crenelle.com)> wrote:
>  
> > Is it possible to set up a udp socket via a background task using
> >  
> > -beginBackgroundTaskWithName:expirationHandler:
> >  
> > (or something like it) such that we're able to continue receiving datagrams 
> > while the app is backgrounded?
>  
> The advice from Technote 2277 "Networking and Multitasking" still applies.
>  
> <https://developer.apple.com/library/ios/#technotes/tn2277/_index.html>
>  
> iOS has no special support for UDP networking in the background, so the only 
> way to do this is to prevent your app from suspending 
> (-beginBackgroundTaskWithName:xxx is one way to do that).
>  
> There's good news and bad news on that front:
>  
> * The good news is that, if you prevent your app from suspending, there's no 
> difference between networking in the background vs the foreground.
>  
> * The bad news is that the system puts strict limits on how long you can run 
> in the background (to preserve device standby time).
>  
> 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 (Macnetworkprog@lists.apple.com 
> (mailto:Macnetworkprog@lists.apple.com))
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/macnetworkprog/adkapx%40gmail.com
>  
> This email sent to adk...@gmail.com (mailto:adk...@gmail.com)  



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (Macnetworkprog@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/macnetworkprog/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to