CallKit 2.X Upgrade to 5.X
This document only describes the upgrade steps for CallKit SDK. If your app project calls methods under RCCallClient in CallLib, please proceed to the CallLib upgrade documentation after completing the steps outlined here.
Upgrade Overview
Compared to CallKit SDK 2.X, version 5.X offers better compatibility with newer iPhone models and operating systems, improved stability, and numerous bug fixes. We recommend upgrading to the new version as soon as possible.
Prerequisites
- CallKit SDK depends on IMKit. Ensure you have upgraded IMKit to version 5.X.
- Ensure your Cocoapod version is 1.10.0 or higher, as required by the IMKit upgrade.
Assessing Upgrade Efforts
- If your app has not modified the CallKit source code (e.g., relies on pod dependencies), simply update the dependencies as described below.
- If you have made minor modifications to CallKit code, follow the error prompts after integration to make adjustments.
- If you have extensively modified CallKit code, we recommend reviewing your changes and reimplementing custom requirements using CallKit 5.X.
Manual Integration
-
Remove all previously depended system libraries from the SDK. Exclude any libraries still required by your app or other SDKs:
- AssetsLibrary
- MapKit
- ImageIO
- Security
- SystemConfiguration
- QuartzCore
- AVFoundation
- GLKit
- OpenGLES
- CoreGraphics
- CoreLocation
- CoreTelephony
- CoreFoundation
- CoreMedia
- CoreAudio
- CoreVideo
- CFNetwork
- AudioToolbox
- VideoToolBox
- AVFoundation
- libc++.tbd
- libz.tbd
- libbz2.tbd
- libiconv.tbd
- libsqlite3.tbd
-
Delete the 2.X versions of
RongCallLib.framework,RongRTCLib.framework,RongCallKit.framework,RongIMLib.framework,RongIMKit.framework, andlibopencore-amrnb.a(included in the RongIMLib package). Replace them with the 5.X versions:RongRTCLib.xcframework,RongIMLibCore.xcframework,RongCallLib.xcframework,RongIMLib.xcframework,RongIMKit.xcframework, andRongCallKit.xcframework. -
In General → Frameworks, Libraries, and Embedded Binaries, set the Embed option for
RongXX.frameworkto Embed & Sign.
Pod Integration
-
Add the following to your Podfile:
pod 'RongCloudRTC/RongCallKit', '~> x.y.z' -
Run the following command in the terminal:
pod installIf you encounter issues finding the specified version, first run
pod repo update, then executepod install.
API Replacement Guide
Initialization API
Replace the legacy AppKey initialization method:
[[RCIM sharedRCIM] initWithAppKey:@"Obtain AppKey from the developer platform"];
Connection API
Replace the legacy IM connection method:
// Connect to IM service
[[RCIM sharedRCIM] connectWithToken:@"Token obtained from your server"
dbOpened:^(RCDBErrorCode code) {}
success:^(NSString *userId) {}
error:^(RCConnectErrorCode status) {}];