Our VoIP app receives PushKit notifications successfully (callservicesd Delivering 1 VoIP payload appears in logs). However, the app is consistently terminated by the system when running in the background or killed state.
The crash is caused by iOS expecting a reportNewIncomingCall to CallKit, but the system reports:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException',
reason: 'Killing app because it never posted an incoming call to the system after receiving a PushKit VoIP push.'
*** Assertion failure in -[PKPushRegistry _terminateAppIfThereAreUnhandledVoIPPushes], PKPushRegistry.m:349
Key Observations: VoIP pushes arrive and are delivered to the app. In foreground, some methods work and CallKit UI sometimes appears. In background/killed state, app is always terminated before CallKit UI shows. Logs confirm the system requires CallKit to be reported immediately inside pushRegistry(_:didReceiveIncomingPushWith:for:completion:).
Steps to Reproduce: Run the app with VoIP + CallKit integration. Put app in background (or kill it). Send a VoIP push.
Observe system logs and crash:
callservicesd: Delivering 1 VoIP payload(s) to application UrgiDoctor: Apps receiving VoIP pushes must post an incoming call via CallKit... error: Killing VoIP app because it failed to post an incoming call in time.
Expected Behavior: On receiving a VoIP push, CallKit UI (Accept / Decline screen) should always appear. App should not be killed if reportNewIncomingCall is called in time.
Actual Behavior: CallKit UI never appears in background/killed state. App is force-terminated by iOS before user can accept/decline the call.
Request:
Guidance on the correct sequence for calling reportNewIncomingCall and completionHandler() in pushRegistry. Clarification if any changes in iOS 17/18 affect PushKit + CallKit behavior. Best practices for ensuring CallKit UI always appears reliably after a VoIP push.
Environment:
iOS 18.5 Simulator + Device
Xcode 16.4 Using PushKit + CallKit with VoIP entitlement