This article will guide you through the quick integration of the TUICallKit component. You will complete several key steps within 10 minutes, ultimately obtaining a video call feature with a complete UI interface.
Use CocoaPods to import the component. If you encounter any issues, please refer to Environment Preparation first. Detailed steps for importing the component are as follows:
1. Please add the dependency pod 'TUICallKit_Swift' to your Podfile. If you encounter any problems, please refer to the Example project.
target 'xxxx'do
...
pod 'TUICallKit_Swift/Professional'
end
Note:
If your project lacks a Podfile, you need to cd into the xxxx.xcodeproj directory in Terminal, and then create a Podfile by executing the following command:
pod init
2. In Terminal, first cd into the Podfile directory and then run the following command to install components.
pod install
Note:
If you cannot install the latest version of TUICallKit, you may first delete Podfile.lock and Pods. Then run the following command to update the local CocoaPods repository list.
pod repo update
Then, run the following command to update the Pod version of the component library.
pod update
3. We suggest you compile and run once. If you encounter any problems, you can refer to our FAQs. If the problem remains unresolved, you may try running our Example project. If you encounter any issues during integration and use, you are welcome to provide feedback to us.
Step 3: Configure the Project
To use audio and video features, you need to authorize the usage of the camera and microphone. Please set the required permissions according to the actual needs of the project.
1. In Xcode, select TARGETS > Info > Custom iOS Target Properties from the menu.
2. Click the + button to add camera and microphone permissions.
Privacy - Camera Usage Description
Privacy - Microphone Usage Description
Step 4: Log in to the TUICallKit component
Add the following code to your project. It works by calling the relevant interfaces in TUICore to complete the login to TUI Component. This step is very important, only after successfully logging in, you can normally use the features offered by TUICallKit.
Your own User ID based on your business. It can only include letters (a-z, A-Z), digits (0-9), underscores, and hyphens.
sdkAppID
Int32
The unique identifier SDKAppID for the audio and video application created in Tencent RTC Console.
secretKey
String
SDKSecretKey for the audio and video application created in Tencent RTC Console.
userSig
String
A security signature for user login to verify identity and prevent unauthorized access to cloud services.
Note:
Development Environment: During local development and debugging, use the local GenerateTestUserSig.genTestSig function to create a userSig. But be careful, the SDKSecretKey can be decompiled and reverse-engineered. If leaked, it could allow theft of your Tencent Cloud traffic.