Voip Notifaction in Background

My app uses CallKit and PushKit for real-time voice and video calls. I want to configure VoIP push notifications so incoming calls can wake the app, even when it’s in the background or terminated.

Right now, I only see the normal Push Notifications option in my App ID settings and no VoIP Services section.

My app uses CallKit and PushKit for real-time voice and video calls. I want to configure VoIP push notifications so incoming calls can wake the app, even when it’s in the background or terminated.

Right now, I only see the normal Push Notifications option in my App ID settings and no VoIP Services section.

I'm not entirely sure of what you're looking at here, so I'm going to give you a general rundown of how VoIP apps are configured and hope that covers your questions:

  • The app itself doesn't actually have any special configuration on the developer portal. In Xcode, you do need to add both the "voip" and "audio" background categories, but both of those are actually modifying the UIBackgroundModes Info.plist key, so that doesn't actually impact the portal.

  • Most VoIP apps also implement standard push, both to support text messaging and for things like notifying the user of missed calls. However, receiving VoIP pushes does NOT actually require authorization from the user.

  • The modern approach to sending VoIP pushes uses the same push certificate as regular push, with "apns-push-type" set to "voip". See "Responding to VoIP Notifications from PushKit" for more guidance on how your app should handle all of this.

  • There is an older push submission process which relies on a dedicated certificate ("VoIP Services Certificate"). I only mention this because you can still find that certificate on the developer portal, but I would recommend NOT using it. It's more work with no real benefit.

Hopefully that clears things up, but please let me know if you have any other questions.

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

Somehow we are having same issue. NOT getting a VoIP notification when the app is in a killed state or terminated state. Notification are delivered while it's in foreground and background states.

Do we need any special entitlements such as com.apple.developer.pushkit.unrestricted-voip, com.apple.developer.voip-services?

Dealing with entitlement questions first...

Do we need any special entitlements?

No. VoIP apps do not require any special entitlement and never have.

such as com.apple.developer.pushkit.unrestricted-voip,

This was a temporary entitlement granted to cover very specific use cases that were incompatible with the iOS 13 CallKit reporting requirements. However, once we'd introduced new APIs to cover those use cases, it was disabled. Some apps do still include it, but it hasn't done anything since the iOS 15 SDK.

com.apple.developer.voip-services?

The entitlement does not exist and was probably an LLM hallucination.

That leads to here...

Somehow we are having the same issue. NOT getting a VoIP notification when the app is in a killed state or terminated state. Notifications are delivered while it's in foreground and background states.

In every case I've ever looked at, this was caused by app logic issues that prevent the app from initializing itself properly. The canonical example is an app that presents a login screen at launch and then initializes PushKit after the user logs in. That works fine in the foreground or if the app is sent to the background, but fails when it launches into the background. Note that the issue here is self-reinforcing, since the system will eventually stop launching the app into the background because it's repeatedly failed to report a call to CallKit as the API contract requires.

In terms of debugging this kind of issue, the best approach I've found is to reproduce the problem a few times, collect a sysdiagnose, then dig through the console log archive to see what happens. callservicesd is what delivers VoIP pushes to your app and, with a bit of practice, it's relatively easy to follow the entire process. This forum post has a decent overview of how to go through one of these logs.

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

Voip Notifaction in Background
 
 
Q