In general the VoIP implementation contains the following steps:
Adding a VoIP capability
Register voip-Pushes:
private func registerForVoIPPushes() {
voipRegistry = PKPushRegistry(queue: nil)
voipRegistry?.delegate = self
voipRegistry?.desiredPushTypes = [.voIP]
}
Implementation of UNUserNotificationCenterDelegate
func pushRegistry(_ registry: PKPushRegistry, didReceiveIncomingPushWith payload: PKPushPayload, for type: PKPushType, completion: @escaping () -> Void)
Offcourse server side correct implementation
5. And the most often issue:
Once the app got voIP notification and not reported it to CXProvider object it won't get notifications anymore until you reinstall it. So, be sure of reporting every voIP you get.