TUIKit supports CocoaPods integration and manual integration. We recommend CocoaPods integration because it enables upgrades to the latest version at any time.
Add the following content in Podfile.
#use_frameworks! // This configuration needs to be shielded because TUIKit uses third-party static libraries.
install! 'cocoapods', :disable_input_output_paths => true // This statement is needed to avoid conflict because TXIMSDK_TUIKit_live_iOS uses a `*.xcassets` resource fie.
pod 'TXIMSDK_TUIKit_iOS' // Integrate the chat, relationship chain and group features, which depends on the audio and video library of TXLiteAVSDK_TRTC by default
// pod 'TXIMSDK_TUIKit_iOS_Professional' // Integrate the chat, relationship chain and group features, which depends on the audio and video library of TXLiteAVSDK_Professional by default
pod 'TXIMSDK_TUIKit_live_iOS' // Integrate group livestreaming and live room list features, which depends on the audio and video library of TXLiteAVSDK_TRTC by default
// pod 'TXIMSDK_TUIKit_live_iOS_Professional' // Integrate group livestreaming and live room list features, which depends on the audio and video library of TXLiteAVSDK_Professional by default
The Tencent Cloud audio and video library cannot be integrated at the same time due to symbol conflicts. If you use a non-TRTC version of an audio and video library, we recommend that you remove it first and then integrate the TXIMSDK_TUIKit_iOS_Professional
version into the pod. This version of the LiteAV_Professional audio and video library includes all basic audio and video capabilities.
Run the following command to install TUIKit.
pod install
If installation of the latest SDK version fails, run the following command to update the local CocoaPods repository list:
pod repo update
#import "TUIKit.h"
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[[TUIKit sharedInstance] setupWithAppId:sdkAppid]; // SDKAppID can be obtained in the IM Console.
}
Was this page helpful?