Skip to main content

Push Notification Management

iOS Push Notification Configuration Overview

  • Apps submitted to China App Store for review

    In this scenario, Apple CallKit cannot be used. Please directly use the RC SDK provided on the official RC website or CocoaPods, and ensure the VoIP Push to APNs Push option under VoIP Settings in the Console remains enabled. For details, see Solution.

  • Apps not submitted to China App Store for review

    1. Modify the macro switch in the RCCXCall.h file of the RongCallKit SDK to enable system CallKit:
    /// Default is 1 (system CallKit disabled)
    #define PUBLIC 0
    1. Disable the VoIP Push to APNs Push option under VoIP Settings in the Console. For details, see VoIP Push.

What is Apple CallKit?

Apple CallKit framework, first released with iOS 10, allows VoIP apps to integrate calling functionality into iPhone's native phone interface. In essence, it enables third-party apps to display voice/video call interfaces identical to regular or FaceTime calls, delivering a seamless user experience.

CallKit Prohibited for Apps Published in China App Store

Around May 2018, Apple required apps published in China App Store to disable CallKit functionality. Apps containing CallKit features would be rejected during review, citing MIIT regulations (see email below). Subsequently, major apps like WeChat and DingTalk removed CallKit from their iOS versions.

Email from Apple

Dear Developer,

The Chinese Ministry of Industry and Information Technology (MIIT) http://www.miit.gov.cn/n1146285/ ... n3057713/index.html requested that CallKit functionality be deactivated in all apps available on the China App Store.

Since your app currently includes CallKit and is available for sale on the China App Store, you will need to submit an update that removes CallKit functionality in China.

VOIP call functionality continues to be allowed but can no longer take advantage of CallKit's intuitive look and feel. CallKit can continue to be used in apps outside of China.

If you have questions or do not believe your app is subject to this update, please contact MIIT.

Best regards,

App Store Review

Without CallKit, apps published in China App Store can only notify users via push notifications for incoming calls. RC's open-source RongCallKit and published libraries exclude Apple's CallKit framework by default to prevent App Store rejections.

Solution

For China App Store submissions, RC replaces VoIP push with standard APNs push for call notifications. Enable VoIP Push to APNs Push in Console's VoIP Settings (enabled by default).

For APNs configuration, refer to IM Push Configuration.

Limitations of APNs push:

  • APNs notifications display as banners with text alerts and system ringtones (max 30s duration per Apple documentation). Apps cannot process these notifications until tapped.
  • Vibration occurs once by default. For continuous vibration, implement Notification Service Extension and differentiate between call and regular message pushes. See demo: (Link).
  • App activates only after tapping the notification. RongCallKit automatically displays call UI after IM connection establishes.
  • Ensure notification permissions are enabled in Settings, with banner style set to "Persistent" to prevent auto-dismissal (iOS system behavior).

CallKit Available for Non-China App Store Apps

If your app isn't submitted to China App Store, you may use Apple CallKit and VoIP push normally.

VoIP Push

Introduced in iOS 8, VoIP Push requires PushKit.framework. Like APNs, it can wake killed apps.

Since iOS 13, VoIP push mandates CallKit.framework integration—otherwise iOS terminates the app process upon receiving VoIP push (Apple documentation).

Apply for VoIP Certificate

  1. In Apple Developer Portal > Certificates, Identifiers & Profiles, select Certificates and click (+) to create:

    (height=250)

  2. Choose VoIP Services Certificate > Continue:

    (height=300)

  3. Bind to your App ID (usually BundleID) > Continue:

    (height=200)

  4. Generate a Certificate Signing Request (CSR) via Keychain Access > Certificate Assistant:

    (height=300)

  5. Enter email address and save to disk:

    (height=300)

  6. Select the CSR file > Continue to generate VoIP certificate:

    (height=200)

  7. Download and export as .p12 via Keychain Access:

    (height=350)

Upload VoIP Certificate

  1. Navigate to RC Developer Platform > IM Service > App Configuration > IM Service > Push Settings, select production environment, and click Configure Push:

(height=500) 9. Upload the .p12 file, enter certificate password, and save:

(height=400)

  1. In RC Console > App Configuration > RTC Service > VoIP Settings, ensure production environment configuration is disabled:

    (height=400)

Configure Provisioning Profile

  • Set provisioning profile to distribution in Xcode—VoIP push only works in production. For details, see Xcode documentation.

Client Configuration

Enable VoIP

  • For RongCallKit development, modify PUBLIC macro to 0 in RCCXCall.h:

    #import <Foundation/Foundation.h>

    /// Default: System CallKit disabled
    #define PUBLIC 0

    /*!
    RC CallKit adapter
    */
    @interface RCCXCall : NSObject
    ...
    @end
  • For RongCallLib development, call setApplePushKitEnable:YES in RCCallClient singleton during app launch (recommended in AppDelegate.m):

    /*!
    Enable Apple PushKit

    @param enable YES to enable
    @discussion
    PushKit requires CallKit.framework since iOS 13. If disabled, standard APNs handles call signaling.
    Default: NO. When enabled, app must handle VoIP push-to-CallKit logic.

    @remarks Call settings
    */
    - (void)setApplePushKitEnable:(BOOL)enable;

Configure Background Modes

Under Capabilities > Background Modes:

  • Pre-Xcode 9: Enable Voice over IP and Remote Notifications

    (height=300)

  • Xcode 9+: Configure info.plist as shown:

Production Testing

tip
  1. VoIP push doesn't work on simulators
  2. Jailbroken devices may not receive VoIP push
  3. Wildcard BundleID apps cannot use VoIP push
  • Option 1:

    For pre-release App Store apps, create an Ad-Hoc Provisioning Profile and export via Ad Hoc Deployment. See Xcode docs.

  • Option 2:

    Use TestFlight for testing. See Xcode docs.

Notes

The CallKit requirement for VoIP push began with iOS 13. Apps built with Xcode 10 (iOS 12) could bypass this restriction, but Apple's March 26, 2020 announcement mandated Xcode 11 for App Store submissions after June 30, 2020, closing this loophole.