Keep bonjour protocol running while the application moves in background

Hi

I have a peer to peer VoIP application for iOS and I am using bonjour protocol to discover devices in a LAN. Everything works well, but when the application is put in background the bonjour service is stopped and the service is removed from the other peers list. Is there a way to keep the bonjour service running while the application is in background ?

thank you

Bogdan

Bonjour, along with most networking, works just fine in the background. The issue here is that the system is suspending your app. Once an app is suspended in the background it’s unable to do any networking, including Bonjour, and that’s why you see the Bonjour service disappear.

iOS does not allow apps to run indefinitely in the background. See iOS Background Execution Limits for more… ahem… background to this issue. And if your background execution scenario isn’t one of the ones covered by that post, please post more details here and I’ll see what I can do to help out.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Is there a way to configure the OS to use shorted wake periods ?

No.

If you post more details about your high-level goals, I may be able to suggest an alternative approach.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Keep bonjour protocol running while the application moves in background
 
 
Q