Implement First Call
CallKit is built upon the CallLib SDK foundation, providing a default call interface that supports various scenarios and functionalities for one-to-one and multi-party audio/video calls.
Room Capacity Limits
- Considering mobile device bandwidth (especially in multi-party video scenarios) and UI interaction effects, we recommend limiting video participants to 16 and audio-only participants to 32 per call/room. Exceeding these limits may impact call quality.
- CallKit has preset participant limits: up to 7 users for video calls and 20 for audio calls by default. To adjust these limits, modify the maxMultiVideoCallUserNumber and maxMultiAudioCallUserNumber parameters in
RCCall, but avoid exceeding recommended thresholds.
Environment Requirements
Minimum requirements for CallKit SDK on iOS:
- iOS 9.0 or later
- Xcode 9.0 or later
Prerequisites
- Create a RC developer account to obtain your App Key. Upon registration, RC Console automatically creates your first application with a development environment App Key using the China (Beijing) Data Center. Note: The development and production environments of the same app have separate App Keys and isolated data.
- Complete RTC service activation. You need to enable the RTC service.
Demo Project
RC provides an iOS demo project showcasing call, meeting, and live streaming functionalities:
https://github.com/rongcloud/rtc-quickdemo-ios
Before running QuickDemo, ensure you've completed:
- Registered an RC developer account
- Prepared your App Key
- Activated the RTC free trial and waited 15 minutes
- Obtained a test Token.
Get Source Code
CallKit is open-source. You can review or integrate the code to customize UI elements like color schemes and button layouts.
https://github.com/rongcloud/callkit-ios/
Dependency Notes
- IMLib (green) exists as a framework within
RongCloudIM - RTCLib and CallLib (yellow) exist as frameworks within
RongCloudRTC - IMKit, its plugins, and CallKit (white) can exist as source code, exclusively in
RongCloudOpenSource
White components may have corresponding frameworks, but in your project they must all be either source code or frameworks to avoid conflicts.

Implementation Recommendations
For source code customization:
- Avoid direct source modification to prevent upgrade conflicts
- Extend functionality by subclassing and overriding methods rather than modifying originals
- Use only public SDK interfaces—private APIs may change during updates
Quick Start
Step 1: Import SDK
RC supports CocoaPods and manual framework integration.
Check the RC SDK download page for the latest version before importing.
CocoaPods
Choose between framework or source code integration via CocoaPods.
When using CallKit with IMKit and plugins, never mix frameworks and source code. See SDK Open Source Notes.
Framework Integration
-
Add to Podfile:
pod 'RongCloudRTC/RongCallKit', '~> x.y.z'Replace
x.y.zwith the version number (check RC download page or CocoaPods). -
Run:
pod installIf version errors occur, run
pod repo updatefirst. -
This generates an
.xcworkspacefile—open it with Xcode.
Source Code Integration
CallKit SDK 5.1.9+ supports source-level debugging via CocoaPods.
-
Add to Podfile as needed:
pod 'RongCloudRTCOpenSource/RongCallKit','x.x.x' # RongCallKit -
Run:
pod installFor version errors, run
pod repo updatefirst. -
Open the generated
.xcworkspacewith Xcode. -
Reference libraries with:
#import <RongCallKit.h>
Manual Framework Integration
Before importing, visit the RC SDK download page to download the RTC SDK (no UI).
From v5.2.0 to 5.4.4 (exclusive), CallKit/CallLib/RTCLib must match IMKit/IMLib versions exactly (first three digits). Starting with 5.4.4, only the first two version digits need to match. CallKit/CallLib/RTCLib 5.4.4 cannot pair with IMKit/IMLib versions below 5.4.4.
- Import
RongCallKit.xcframeworkwithEmbed & Sign - Import
RongCallLib.xcframeworkwithEmbed & Sign - Import
RongRTCLib.xcframeworkwithEmbed & Sign - Import
RongIMLib.xcframeworkwithEmbed & Sign - Import
RongIMKit.xcframeworkwithEmbed & Sign - Import
RongIMLibCore.xcframeworkwithEmbed & Sign
Step 2: Project Configuration
- Add these keys to info.plist for microphone/camera permissions:
- Privacy - Microphone Usage Description
- Privacy - Camera Usage Description
- Enable these Background Modes under Target -> Signing & Capabilities:
- Audio, AirPlay, and Picture in Picture
- Remote notifications
For SDK versions ≤5.1.1, add App Transport Security Settings with Allow Arbitrary Loads set to YES in info.plist to permit HTTP requests.
Step 3: Initialization
Since RTC SDK uses IM SDK as its signaling channel, initialize IM SDK first. Do this once during app lifecycle, ideally at launch or when loading RTC features.
// Initialize IM SDK
[[RCIM sharedRCIM] initWithAppKey:@"Get AppKey from developer platform"];
Step 4: Connect to IM Service
RTC signaling relies on RC's IM service. Establish a TCP connection via connectWithToken before making calls. Call disconnect or logout when exiting the module.
[[RCIM sharedRCIM] connectWithToken:@"Token from your server"
dbOpened:^(RCDBErrorCode code) {
if (code != RCDBErrorCode_Success) {
// Handle database open failure
}
}
success:^(NSString *userId) {
// Handle connection success
}
error:^(RCConnectErrorCode status) {
// Handle connection failure
}];
Step 5: Caller Implementation
Apps typically need both calling and receiving logic.
Initiate 1:1 Call
- (void)startSingleCall:(NSString *)targetId mediaType:(RCCallMediaType)mediaType;
| Parameter | Type | Required | Description |
|---|---|---|---|
| targetId | NSString | Yes | Callee's user ID |
| mediaType | RCCallMediaType | Yes | Media type |
-
Example:
[[RCCall sharedRCCall] startSingleCall:@"CalleeUserId" mediaType:RCCallMediaVideo];
Initiate Group Call
Group calls require either ConversationType_GROUP or ConversationType_DISCUSSION, with all participants in the same group.
- (void)startMultiCallViewController:(RCConversationType)conversationType
targetId:(NSString *)targetId
mediaType:(RCCallMediaType)mediaType
userIdList:(NSArray *)userIdList;
-
Parameters:
Parameter Type Required Description conversationType RCConversationType Yes Conversation type targetId NSString Yes Group ID mediaType RCCallMediaType Yes Media type userIdList NSArray Yes Callee user ID list -
Example:
[[RCCall sharedRCCall] startMultiCallViewController:ConversationType_GROUP
targetId:@"GroupID"
mediaType:RCCallMediaVideo
userIdList:@[@"UserA", @"UserB", @"UserC"]];
Member Selection Call
This method first shows a member selection UI before initiating a group call. For group calls, implement groupMemberDataSource.
- (void)startMultiCall:(RCConversationType)conversationType
targetId:(NSString *)targetId
mediaType:(RCCallMediaType)mediaType;
-
Parameters:
Parameter Type Required Description conversationType RCConversationType Yes Conversation type targetId NSString Yes Group ID mediaType RCCallMediaType Yes Media type -
Example:
[[RCCall sharedRCCall] startMultiCall:ConversationType_GROUP
targetId:@"GroupID"
mediaType:RCCallMediaVideo];
Step 6: Callee Implementation
CallKit implements RCCallReceiveDelegate (incoming call handling) and RCCallSessionDelegate (call status) from CallLib. When receiving a call, the interface auto-launches—simply tap "Answer" to join.
If the app is backgrounded/closed, users receive a notification. Tapping it launches the app with the call interface.
Plugin Integration
CallKit supports official beauty filters or FaceUnity plugins. Note: FaceUnity requires CallKit ≥5.4.0.