This document describes how to quickly integrate the Tencent Cloud IM SDK (iOS) into your projects. To configure and integrate the SDK, follow these steps.
You can either automatically integrate the IM SKD by using CocoaPods, or manually download the SDK and import it to your current project.
Run the following command in a terminal window (you need to install the Ruby environment on your Mac device in advance):
sudo gem install cocoapods
Navigate to the path where the project is located and run the following command. Then, a Podfile will appear under the project path.
Edit the Podfile as follows:
platform :ios, '8.0' source 'https://github.com/CocoaPods/Specs.git' target 'App' do pod 'TXIMSDK_iOS' end
Run the following command in a terminal window to update the local library file and install TXIMSDK:
Alternatively, run the following command to update the local library version:
After the pod command is executed, a project file integrated with the SDK and suffixed .xcworkspace will be generated. Double-click the file to open it.
If the pod search fails, we recommend that you try to update the pod's local repo cache. The update command is as follows:
pod setup pod repo update rm ~/Library/Caches/CocoaPods/search_index.json
|ImSDK.framework||IM feature pack|
|TXLiteAVSDK_UGC.framework||Extension pack for recording and editing short videos||This pack provides the short-video recording and editing features.|
Create a new project:
Enter a project name (for example, IMDemo):
Add the dependent library: select the Target of IMDemo. On the General panel, add the dependent library under Embedded Binaries and Linked Frameworks and Libraries.
Add the dependent library:
You need to add
-ObjCin Build Setting > Other Linker Flags.
You can use the SDK in project code in two ways: