Skip to main content

VoIP PushKit integration

The current iOS Call SDK exposes two public APIs that are directly related to VoIP PushKit:

  • [[NCCallEngine getInstance] enableVoipPushKit:YES]
  • onVoIPPushReceived: on NCCallEventHandler, with payload NCCallVoIPPushReceivedEvent

NCCallVoIPPushReceivedEvent exposes callId, inviterUserId, mediaType, userIdList, and userDict.

When to use VoIP PushKit

If your iOS app needs to detect incoming calls more quickly after the app is killed or moved to the background, evaluate whether to enable VoIP PushKit. Whether CallKit or PushKit is allowed in your target market depends on your product and compliance policy.

Enable PushKit

Objective C
[[NCCallEngine getInstance] enableVoipPushKit:YES];

Set this during app startup, before you expect to handle VoIP push callbacks.

The SDK internally obtains and uploads the VoIP token. The app does not need to call a separate Call SDK API to upload the VoIP token.

Receive VoIP incoming call data

Objective C
@interface MyCallHandler () <NCCallEventHandler>
@end

@implementation MyCallHandler

- (void)onVoIPPushReceived:(NCCallVoIPPushReceivedEvent *)event {
// event.callId, event.inviterUserId, event.mediaType, event.userIdList, event.userDict
}

@end

What the SDK supports

The iOS Call SDK supports the following VoIP PushKit behavior:

  • The SDK can enable or disable VoIP PushKit behavior.
  • The SDK can deliver VoIP incoming call data back to the app layer (NCCallVoIPPushReceivedEvent).
  • The event payload includes the server call ID, inviter user ID, media type, participant user ID list, and extra payload dictionary when these values are present.
  • After you enable VoIP PushKit, the SDK internally obtains and uploads refreshed VoIP credentials automatically.

The current repository does not directly confirm the full console configuration flow after APNs or VoIP certificates are uploaded, so that part is still outside the scope of this page.