CallKit
Build VoIP calling features that integrate with the native iOS call UI using CallKit and PushKit. Covers incoming/outgoing call flows, VoIP push registration, audio session coordination, and call directory extensions.
Contents
- Setup
- Provider Configuration
- Incoming Call Flow
- Outgoing Call Flow
- PushKit VoIP Registration
- Audio Session Coordination
- Call Directory Extension and Manager
- Common Mistakes
- Review Checklist
- References
Setup
Project Configuration
- Enable the Voice over IP background mode in Signing & Capabilities
- Add the Push Notifications capability
- For call directory extensions, add a Call Directory Extension target
Key Types
Provider Configuration
Create a single CXProvider at app launch and keep it alive for the app
lifetime. Configure it with a CXProviderConfiguration that describes your
calling capabilities.
Incoming Call Flow
When a required VoIP call push arrives, report the incoming call to CallKit immediately. The system displays the native call UI. You must report required calls before the PushKit completion handler returns -- failure to do so causes the system to terminate your app.
Handling the Answer Action
Implement CXProviderDelegate to respond when the user answers:
Outgoing Call Flow
Use CXCallController to request an outgoing call. The system routes the
request through your CXProviderDelegate.
Delegate Methods for Outgoing Calls
PushKit VoIP Registration
Register for VoIP pushes at every app launch and send token changes to your
server. For iOS 13 SDK+ apps, every report-required VoIP call push must be
reported before PushKit completion using CallKit, or LiveCommunicationKit for
apps built on that framework. On iOS 26.4+, PKVoIPPushMetadata.mustReport is
the gate: true means report before completion; false means no CallKit or
LiveCommunicationKit report is required. Missing a required report before
completion can terminate the app, and repeated failures may stop VoIP delivery.
Server-side VoIP pushes should use a short lifetime: set apns-expiration to
0 or only a few seconds. After the initial push wakes the app, send hangups
and call-detail changes over the app-server connection instead of sending more
VoIP pushes.
Audio Session Coordination
CallKit owns the audio activation boundary: start media only in
provider(_:didActivate:), and stop or tear it down in
provider(_:didDeactivate:) and reset paths.
Call Directory Extension and Manager
Use Call Directory for preloaded caller ID/blocking, not per-call API lookup.
The extension loads sorted bulk data in beginRequest(with:); the main app uses
CXCallDirectoryManager to check enabled status, open Call Blocking &
Identification settings when disabled, and reload after data changes. Store
CXCallDirectoryPhoneNumber as country code plus digits in ascending order
(for example 18005551234), not a formatted string.
Main-App Manager: Status, Settings, Reload
Check getEnabledStatusForExtension(...) before assuming the extension is
active, use openSettings(...) for Call Blocking & Identification when
disabled, and call reloadExtension(...) after data changes. Route APNs
auth-key rotation and normal remote-notification setup to push-notifications.
Common Mistakes
Review Checklist
- VoIP background mode enabled in capabilities
- Single
CXProviderinstance created at app launch and retained -
CXProviderDelegateset before reporting any calls - iOS 26.4+ PushKit path reports when
mustReportis true and may skip when false - iOS 13 SDK+ PushKit VoIP call pushes report to CallKit before completion
- VoIP APNs requests use
apns-expirationof0or only a few seconds - Hangups and detail updates use the app-server connection after the initial push
-
action.fulfill()oraction.fail()called for every provider delegate action -
CXAnswerCallActionfulfilled only after the call server/media connection is ready - Audio engine started only after
provider(_:didActivate:)callback - Audio engine stopped in
provider(_:didDeactivate:)callback - Audio session category set to
.playAndRecordwith.voiceChatmode - VoIP push token sent to server on every
didUpdate pushCredentialscallback -
PKPushRegistrycreated at every app launch (not lazily) - Call Directory data is preloaded, not fetched per incoming call
-
CXCallDirectoryPhoneNumberdocumented as country calling code + digits -
CXCallDirectoryManagernames status check, reload, and settings-opening APIs -
CXCallUpdatepopulated withlocalizedCallerNameandremoteHandle - Outgoing calls report
startedConnectingAtandconnectedAttimestamps - iOS 26 call translation keeps upstream audio active during mute
- Encrypted metadata filtering mentions the notification service extension entitlement
References
- Extended patterns (hold, mute, group calls, delegate lifecycle): references/callkit-patterns.md [blocked]
- CallKit framework
- CXProvider
- CXCallController
- CXCallAction
- CXCallUpdate
- CXProviderConfiguration
- CXProviderDelegate
- PKPushRegistry
- PKPushRegistryDelegate
- PKVoIPPushMetadata
- CXCallDirectoryProvider
- CXCallDirectoryPhoneNumber
- CXCallDirectoryManager
- CXSetTranslatingCallAction
- reportNewIncomingVoIPPushPayload(_:completion:)
- Making and receiving VoIP calls
- Responding to VoIP Notifications from PushKit


