VoIP on lock screen issues

Hi,


currently I'm experimenting with VoIP. I've developed a simple VoIP app using the "old" keep alive timeout approach (not PushKit) including

a inputstream and outputstream. The VoIP communication between my iPad and the VoIP server seems to work properly, except on a locked device.


My test case is as follows:

1. I start the VoIP app (which connects to the VoIP server) and then lock the device (with or without a code).

2. I simulate a VoIP-Call for the device, which will be noticed (local notification on lock screen).

3. I ignore the VoIP call on the device


This all works fine. But if I do this again and again, something like stress testing, then it seems that iOS terminates the app after a while.

I cannot figure out why exactly this will be done. My considerations go from a too high CPU usage or an exceeded number of received bytes.

This kind of stress testing is a little bit weird, but actually, this should work.


What I've found out:

- the VoIP app works fine on an unlocked device

- the VoIP app won't be terminated, if I don't sent a call to the device

- the life span of the app (on the lock screen) can be increased, if I take short breaks between each VoIP call (e.g. 1 seconds)


If this is a normal behavior, what will happen if someone won't accept VoIP calls over and over again?

Then the app will be terminated? Is there an upper limit for bytes that are allowed to be received (or something else) before iOS kills the app?


Best regards,

Thomas

If iOS has killed your app it should generate a crash log for that event. Do you see such a log?

See Technote 2151 Understanding and Analyzing iOS Application Crash Reports for information on how to get these logs.

My guess is that you’ll see a log with the

0xbad22222
exception code but let’s confirm that before we get into the details.

Finally, I want to address this:

I've developed a simple VoIP app using the "old" keep alive timeout approach (not PushKit) including a inputstream and outputstream.

Developing new code with an old, now-officially-deprecated API, is a poor choice IMO.

Share and Enjoy

Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

There is a limitation for the background app: if the app is wakeing up more than x times (i don't remember exactly the number and I could not find the documentation anymore) in 10 minutes interval then the app will be killed by the operating system and not restarted.

Probably not using pushkit as it has major issues, for example, how do you work when there is no internet connection ?

Serious flaw in deprecating a working method and replacing it with something that won't work. PushKit looks like a great idea but just not thought through

VoIP on lock screen issues
 
 
Q