Question

Is there any way to handle network events on-the-fly in iOS 4.2.1 when app in background?

To be more specific, here are two examples:

  1. Receiving VoIP call while another app in foreground
  2. Receiving XMPP message while another app in foreground

Use of setKeepAliveTimeout:handler: seems not possible, since minimum delay is 600 seconds (10 minutes).

Was it helpful?

Solution

Well you can keep a socket open when you add the Required background modes and add voip to you info.plist. This will allow you to catch any incoming calls, the just notify the user with a UILocalNotification.

You can't really do it for IM system, since they do not fall in the Voip category.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top