
SDKAppID and SDKSecretKey. These credentials will be required in the subsequent Login steps.pod 'TUICallKit_Swift' dependency in your project's Podfile file. For example:target 'YourProjectTarget' dopod 'TUICallKit_Swift'end
.xcodeproj directory in the terminal, then execute the pod init command to create a Podfile file. After creation, add the pod 'TUICallKit_Swift' dependency in your Podfile file. For example:// 1 Enter your .xcodeproj directory in the terminalcd /Users/yourusername/Projects/YourProject// 2pod init// 3 In the generated Podfile filetarget 'YourProjectTarget' dopod 'TUICallKit_Swift'end
Podfile file is located in the terminal, then run the following command to install components.pod install --repo-update
YourProjectName.xcworkspace file.Info.plist file,These descriptions will be displayed to the user when the system initially prompts for permission.<key>NSCameraUsageDescription</key><string>TUICallKitApp needs access to your camera, and it can be used for functions such as Video Call, Group Video Call.</string><key>NSMicrophoneUsageDescription</key><string>TUICallKitApp needs access to your microphone,and it can be used for functions such as Audio Call, Group Audio Call, Video Call, Group Video Call.</string>

import TUICoreimport TUICallKit_Swiftfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {let userID = "denny" // Please replace with your UserIdlet sdkAppID: = 1234 // Please replace it with the SDKAppID obtained from the console.let secretKey = "****" // Please replace it with the SecretKey obtained from the console.let userSig = GenerateTestUserSig.genTestUserSig(userID: userID, sdkAppID: sdkAppID, secretKey: secretKey)TUILogin.login(Int32(sdkAppID), userID: userID, userSig: userSig) {print("login success")} fail: { code, message inprint("login failed, code: \\(code), error: \\(message ?? "nil")")}return true}
Parameter | Type | Description |
userId | String | only allow a combination of uppercase and lowercase letters (a-z A-Z), numbers (0-9), underline and hyphen |
sdkAppId | int | |
secretKey | String | The SDKSecretKey of the audio and video application created in the Tencent Real-Time Communication (TRTC) Console. |
userSig | String | A security signature used for user login authentication, confirming user authenticity and preventing malicious attacks from stealing your cloud service usage rights. |
GenerateTestUserSig.genTestSig function to generate userSig. In this method, the secretKey is very easy to decompile and reverse. Once your key is leaked, attackers can steal your Tencent Cloud traffic.import TUICallKit_Swiftimport AtomicXCoreTUICallKit.createInstance().setSelfInfo(nickname: "jack", avatar: "https:/****/user_avatar.png", completion: { result inswitch result {case .success:// successcase .failure(let error):// fail}})
Parameter | Type | Description |
nickname | String | Target user's nickname |
avatar | String | Target user's avatar |
completion | CompletionClosure | Callback for the result of an asynchronous operation |
calls function and specifying the media type (voice or video) and the callee's User ID list (userIdList). The calls interface supports both one-to-one and group calls. A one-to-one call is initiated when the userIDList contains only a single User ID; a group call is initiated when it contains multiple User IDs.calls interface cannot be written in the viewDidLoad method; it should be called in the button's click event or other user interaction response methods.import TUICallKit_Swiftimport AtomicXCore// Trigger single-person voice callTUICallKit.createInstance().calls(userIdList: ["mike"], callMediaType: .audio, params: nil, completion: { result inswitch result {case .success:// successcase .failure(let error):// fail}})
Parameter | Type | Description |
userIdList | [String] | Target user ID list |
mediaType | Media type of the call, such as video call, voice call | |
params | Call extension parameters, such as room number, call invitation timeout | |
completion | CompletionClosure | Callback for the result of an asynchronous operation |

import TUICallKit_SwiftTUICallKit.createInstance().enableAITranscriber(enable: true)

import TUICallKit_SwiftTUICallKit.createInstance().enableFloatWindow(enable: true)

import TUICallKit_SwiftTUICallKit.createInstance().enableIncomingBanner(enable: true)
import TUICallKit_Swiftimport AtomicXCoreTUICallKit.createInstance().calls(userIdList: ["mike", "tate"], callMediaType: .audio, params: nil, completion: { result inswitch result {case .success:// successcase .failure(let error):// fail}})
Parameter | Type | Description |
userIdList | [String] | Target user ID list |
mediaType | Media type of the call, such as video call, voice call | |
params | Call extension parameters, such as room number, call invitation timeout | |
completion | CompletionClosure | Callback for the result of an asynchronous operation |
import TUICallKit_SwiftTUICallKit.createInstance().join(callId: "")
Parameter | Type | Description |
callId | String | The unique ID for this call. |
TUIGlobalization.setPreferredLanguage method.import TUICorefunc setLanguage() {TUIGlobalization.setPreferredLanguage("en")}
Parameter | Type | Description |
language | String | "zh-Hans": Simplified Chinese. "zh-Hant": Traditional Chinese. "ja": Japanese "en": English. "ar" : Arabic. |
import TUICallKit_SwiftTUICallKit.createInstance().setCallingBell(filePath: "***/callingBell.mp3")
filePath.Parameter | Type | Description |
filePath | String | Ringtone file path |
import TUICallKit_SwiftTUICallKit.createInstance().enableMuteMode(enable: true)
phone_ringing.mp3.Icon | File name | Description |
![]() | icon_dialing.png | Answer incoming call icon |
![]() | icon_hangup.png | Hang Up Call icon |
![]() | icon_mute_on.png | Turn off the mic icon |
![]() | icon_handsfree.png | Turn off the speaker icon |
![]() | icon_camera_off.png | Camera Off icon |
![]() | icon_add_user.png | Invite user icon during call |

피드백