TUIKit
components. sudo gem install cocoapods
pod init
Integration methods | Suitable Scenarios | Advantage | Disadvantage |
Remote CocoaPods Integration | Suitable for integration without source code modifications. | When there is a version update of TUIKit, you only need to Pod update again to complete the update. | When you have modifications to the source code, using Pod update to update will overwrite your modifications with the new version of TUIKit. |
Local DevelopmentPods Integration | Suitable for customers who have custom modifications to the source code | When you have your own git repository, you can track changes. After modifying the source code, using Pod update to update other remote Pod libraries will not overwrite your modifications. | You need to manually overwrite your local TUIKit folder with the TUIKit source code to update. |
# Uncomment the next line to define a global platform for your project# ...source 'https://github.com/CocoaPods/Specs.git'platform :ios, '13.0'# Prevent `*.xcassets` in TUIKit from conflicting with your projectinstall! 'cocoapods', :disable_input_output_paths => true# Replace `your_project_name` with your actual project nametarget 'your_project_name' do# Comment the next line if you don't want to use dynamic frameworks# TUIKit components are dependent on static libraries. Therefore, you need to mask the configuration.# use_frameworks!# Enable modular headers as needed. Only after you enable modular headers, the Pod module can be imported using @import.# use_modular_headers!# Integrate the chat featurepod 'TUIChat/UI_Minimalist'# Integrate the conversation list featurepod 'TUIConversation/UI_Minimalist'# Integrate the relationship chain featurepod 'TUIContact/UI_Minimalist'# Integrate the group featurepod 'TUIGroup/UI_Minimalist'# Integrate the search feature (To use this feature, you need to purchase the Premium edition)pod 'TUISearch/UI_Minimalist'# Integrate the audio/video call featurepod 'TUICallKit'# Integrate Translation Plugin, supported starting from version 7.2 (Value-added feature activation required, please contact Tencent Cloud Business to activate)pod 'TUITranslationPlugin'# Integrate Session Tagging Plugin, supported starting from version 7.3pod 'TUIConversationMarkPlugin'# Integrate Speech-to-Text Plugin, supported starting from version 7.5pod 'TUIVoiceToTextPlugin'# Integrate message push plugin, supported starting from version 7.6pod 'TIMPush'end#Pods configpost_install do |installer|installer.pods_project.targets.each do |target|target.build_configurations.each do |config|#Fix Xcode14 Bundle target errorconfig.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"config.build_settings['ENABLE_BITCODE'] = "NO"config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = "13.0"#Fix Xcode15 other links flag -ld64xcode_version = `xcrun xcodebuild -version | grep Xcode | cut -d' ' -f2`.to_fif xcode_version >= 15xcconfig_path = config.base_configuration_reference.real_pathxcconfig = File.read(xcconfig_path)if xcconfig.include?("OTHER_LDFLAGS") == falsexcconfig = xcconfig + "\\n" + 'OTHER_LDFLAGS = $(inherited) "-ld64"'elseif xcconfig.include?("OTHER_LDFLAGS = $(inherited)") == falsexcconfig = xcconfig.sub("OTHER_LDFLAGS", "OTHER_LDFLAGS = $(inherited)")endif xcconfig.include?("-ld64") == falsexcconfig = xcconfig.sub("OTHER_LDFLAGS = $(inherited)", 'OTHER_LDFLAGS = $(inherited) "-ld64"')endendFile.open(xcconfig_path, "w") { |file| file << xcconfig }endendendend
# Uncomment the next line to define a global platform for your projectsource 'https://github.com/CocoaPods/Specs.git'platform :ios, '13.0'# Prevent `*.xcassets` in TUIKit from conflicting with your projectinstall! 'cocoapods', :disable_input_output_paths => true# Replace `your_project_name` with your actual project nametarget 'your_project_name' do# Comment the next line if you don't want to use dynamic frameworks# TUIKit components are dependent on static libraries. Therefore, you need to mask the configuration.# use_frameworks!# Enable modular headers as needed. Only after you enable modular headers, the Pod module can be imported using @import.# use_modular_headers!# Integrate the chat featurepod 'TUIChat/UI_Classic'# Integrate the conversation list featurepod 'TUIConversation/UI_Classic'# Integrate the relationship chain featurepod 'TUIContact/UI_Classic'# Integrate the group featurepod 'TUIGroup/UI_Classic'# Integrate the search feature (To use this feature, you need to purchase the Premium edition)pod 'TUISearch/UI_Classic'# Integrate the audio/video call featurepod 'TUICallKit'# Integrate Voting Plugin, supported starting from version 7.1pod 'TUIPollPlugin'# Integrate Group Chain Plugin, supported starting from version 7.1pod 'TUIGroupNotePlugin'# Integrate Translation Plugin, supported starting from version 7.2 (Value-added feature activation required, please contact Tencent Cloud Business to activate)pod 'TUITranslationPlugin'# Integrate Session Grouping Plugin, supported starting from version 7.3pod 'TUIConversationGroupPlugin'# Integrate Session Tagging Plugin, supported starting from version 7.3pod 'TUIConversationMarkPlugin'# Integrate Speech-to-Text Plugin, supported starting from version 7.5pod 'TUIVoiceToTextPlugin'# Integrate Customer Service Plugin, supported starting from version 7.6pod 'TUICustomerServicePlugin'# Integrate message push plugin, supported starting from version 7.6pod 'TIMPush'end#Pods configpost_install do |installer|installer.pods_project.targets.each do |target|target.build_configurations.each do |config|#Fix Xcode14 Bundle target errorconfig.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"config.build_settings['ENABLE_BITCODE'] = "NO"config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = "13.0"#Fix Xcode15 other links flag -ld64xcode_version = `xcrun xcodebuild -version | grep Xcode | cut -d' ' -f2`.to_fif xcode_version >= 15xcconfig_path = config.base_configuration_reference.real_pathxcconfig = File.read(xcconfig_path)if xcconfig.include?("OTHER_LDFLAGS") == falsexcconfig = xcconfig + "\\n" + 'OTHER_LDFLAGS = $(inherited) "-ld64"'elseif xcconfig.include?("OTHER_LDFLAGS = $(inherited)") == falsexcconfig = xcconfig.sub("OTHER_LDFLAGS", "OTHER_LDFLAGS = $(inherited)")endif xcconfig.include?("-ld64") == falsexcconfig = xcconfig.sub("OTHER_LDFLAGS = $(inherited)", 'OTHER_LDFLAGS = $(inherited) "-ld64"')endendFile.open(xcconfig_path, "w") { |file| file << xcconfig }endendendend
pod 'TUIChat'
without specifying classic or minimalist, it will integrate both UI component versions by default. use_modular_headers!
, and change the header file reference to @import reference.pod install
pod repo update
pod update
pod 'TUICore', :path => "../TUIKit/TUICore"
pod 'TUICore', :path => "/TUIKit/TUICore"
pod 'TUICore', :path => "./TUIKit/TUICore"
ment# Uncomment the next line to define a global platform for your projectsource 'https://github.com/CocoaPods/Specs.git'platform :ios, '13.0'install! 'cocoapods', :disable_input_output_paths => true# Replace `your_project_name` with your actual project nametarget 'your_project_name' do# Uncomment the next line if you're using Swift or would like to use dynamic frameworksuse_frameworks!use_modular_headers!# Note: To perform upgrade when using a local integration solution, you need to access# https://github.com/TencentCloud/TIMSDK/tree/master/iOS/TUIKit# to obtain the latest component code, and place it in the local specified directory, such as /TIMSDK/ios/TUIKit/TUICore.# Note: When custom modifications conflict with remote changes, you need to manually merge them to resolve conflicts.# Integrate the basic library (required)pod 'TUICore', :path => "../TUIKit/TUICore"pod 'TIMCommon', :path => "../TUIKit/TIMCommon"# Integrate TUIKit components (optional)# Integrate the chat featurepod 'TUIChat', :path => "../TUIKit/TUIChat"# Integrate the conversation list featurepod 'TUIConversation', :path => "../TUIKit/TUIConversation"# Integrate the relationship chain featurepod 'TUIContact', :path => "../TUIKit/TUIContact"# Integrate the group featurepod 'TUIGroup', :path => "../TUIKit/TUIGroup"# Integrate the search feature (To use this feature, you need to purchase the Ultimate edition)pod 'TUISearch', :path => "../TUIKit/TUISearch"# Integrate the audio/video call featurepod 'TUICallKit'# Integrate the video conference featurepod 'TUIRoomKit'# Integrate the TUIKitPlugin plugin (optional)# Note: The TUIKitPlugin plugin version must be the same as the TUICore version.# Ensure that the plugin version matches spec.version in "../TUIKit/TUICore/TUICore.spec".# Integrate the voting plugin, supported from version 7.1pod 'TUIPollPlugin', '7.6.5011'# Integrate the group chain plugin, supported from version 7.1pod 'TUIGroupNotePlugin', '7.6.5011'# Integrate translation plugin, supported from version 7.2 (Value-added feature activation is required. Please contact Tencent Cloud sales)pod 'TUITranslationPlugin', '7.6.5011'# Integrate the session grouping plugin, supported from version 7.3pod 'TUIConversationGroupPlugin', '7.6.5011'# Integrate the session tagging plugin, supported from version 7.3pod 'TUIConversationMarkPlugin', '7.6.5011'# Integrate the offline push featurepod 'TIMPush'# Other Podspod 'MJRefresh'pod 'Masonry'end#Pods configpost_install do |installer|installer.pods_project.targets.each do |target|target.build_configurations.each do |config|#Fix Xcode14 Bundle target errorconfig.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"config.build_settings['ENABLE_BITCODE'] = "NO"config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = "13.0"#Fix Xcode15 other links flag -ld64xcode_version = `xcrun xcodebuild -version | grep Xcode | cut -d' ' -f2`.to_fif xcode_version >= 15xcconfig_path = config.base_configuration_reference.real_pathxcconfig = File.read(xcconfig_path)if xcconfig.include?("OTHER_LDFLAGS") == falsexcconfig = xcconfig + "\\n" + 'OTHER_LDFLAGS = $(inherited) "-ld64"'elseif xcconfig.include?("OTHER_LDFLAGS = $(inherited)") == falsexcconfig = xcconfig.sub("OTHER_LDFLAGS", "OTHER_LDFLAGS = $(inherited)")endif xcconfig.include?("-ld64") == falsexcconfig = xcconfig.sub("OTHER_LDFLAGS = $(inherited)", 'OTHER_LDFLAGS = $(inherited) "-ld64"')endendFile.open(xcconfig_path, "w") { |file| file << xcconfig }endendendend
pod install
- Masonry (1.1.0)- MJExtension (3.4.1)- MJRefresh (3.7.5)- ReactiveObjC (3.1.1)- SDWebImage (5.18.11):- SDWebImage/Core (= 5.18.11)- SDWebImage/Core (5.18.11)- SnapKit (5.6.0)- SSZipArchive (2.4.3)
pod install
, you may encounter this issue due to using an older version of CocoaPods. There are two solutions:Project Format
version to Xcode13.0.Build Settings
, add -ld64
to Other Linker Flags
.pod repo update
to update your local repository, then use pod update
to refresh the updates.Pod update
for cross-reference.Build Phases
option, then add a Run Script
to the current panel;#!/bin/sh# Strip invalid architecturesstrip_invalid_archs() {binary="$1"echo "current binary ${binary}"# Get architectures for current filearchs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)"stripped=""for arch in $archs; doif ! [[ "${ARCHS}" == *"$arch"* ]]; thenif [ -f "$binary" ]; then# Strip non-valid architectures in-placelipo -remove "$arch" -output "$binary" "$binary" || exit 1stripped="$stripped $arch"fifidoneif [[ "$stripped" ]]; thenecho "Stripped $binary of architectures:$stripped"fi}APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}"# This script loops through the frameworks embedded in the application and# removes unused architectures.find "$APP_PATH" -name '*.framework' -type d | while read -r FRAMEWORKdoFRAMEWORK_EXECUTABLE_NAME=$(defaults read "$FRAMEWORK/Info.plist" CFBundleExecutable)FRAMEWORK_EXECUTABLE_PATH="$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME"echo "Executable is $FRAMEWORK_EXECUTABLE_PATH"strip_invalid_archs "$FRAMEWORK_EXECUTABLE_PATH"done
TXLiteAVSDK_TRTC
library, a symbol conflict will not occur. You can directly add the dependency in Podfile:pod 'TUICallKit'
TXLiteAVSDK_Professional
library, a symbol conflict will occur. You can add the dependency in Podfile:pod 'TUICallKit/Professional'
TXLiteAVSDK_Enterprise
library, a symbol conflict will occur. It is recommended to upgrade to TXLiteAVSDK_Professional
and then use TUICallKit/Professional
.
Was this page helpful?