@tencent-rtc/mcp 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -37
- package/package.json +1 -1
- package/resource/doc/chatuikit/android/client_api_Android.md +1373 -0
- package/resource/doc/chatuikit/android/generate_UserSig.md +306 -0
- package/resource/doc/chatuikit/android/integrarte_only_tuichat_Android.md +290 -0
- package/resource/doc/chatuikit/android/integrate_tuikit_Android.md +287 -0
- package/resource/doc/chatuikit/android/quick_start_Android.md +138 -0
- package/resource/doc/chatuikit/android/show_typing_Android.md +43 -0
- package/resource/doc/chatuikit/faq/faq_sdk.md +120 -0
- package/resource/doc/chatuikit/faq/generate_UserSig.md +306 -0
- package/resource/doc/chatuikit/flutter/client_api_Flutter.md +932 -0
- package/resource/doc/chatuikit/flutter/generate_UserSig.md +306 -0
- package/resource/doc/chatuikit/flutter/integrate_only_tuichat_Flutter.md +333 -0
- package/resource/doc/chatuikit/flutter/integrate_tuikit_Flutter.md +769 -0
- package/resource/doc/chatuikit/flutter/quick_start_Flutter.md +217 -0
- package/resource/doc/chatuikit/iOS/client_api_iOS.md +1121 -0
- package/resource/doc/chatuikit/iOS/generate_UserSig.md +306 -0
- package/resource/doc/chatuikit/iOS/integrate_only_tuichat_iOS.md +748 -0
- package/resource/doc/chatuikit/iOS/integrate_tuikit_iOS.md +852 -0
- package/resource/doc/chatuikit/iOS/quick_start_iOS.md +163 -0
- package/resource/doc/chatuikit/iOS/show_typing_iOS.md +52 -0
- package/resource/doc/chatuikit/react/generate_UserSig.md +306 -0
- package/resource/doc/chatuikit/react/integrate_tuichat_only_react.md +202 -0
- package/resource/doc/chatuikit/react/integrate_tuichat_react.md +279 -0
- package/resource/doc/chatuikit/vue/generate_UserSig.md +306 -0
- package/resource/doc/chatuikit/vue/integrate_only_tuichat_Vue_web.md +124 -0
- package/resource/doc/chatuikit/vue/integrate_tuikit_Vue_web.md +552 -0
- package/resource/doc/tuicallkit/react/how_to_integrated_react_callkit.md +84 -55
- package/server.js +51 -27
- package/server.js.map +1 -1
|
@@ -0,0 +1,852 @@
|
|
|
1
|
+
This article introduces how to integrate `TUIKit` components.
|
|
2
|
+
|
|
3
|
+
> **Note:**
|
|
4
|
+
>
|
|
5
|
+
> - Starting from version 5.7.1435, TUIKit supports modular integration and the classic UI. You can integrate the necessary modules according to your needs.
|
|
6
|
+
> - Starting from version 6.9.3557, TUIKit introduces a brand new minimalist UI.
|
|
7
|
+
> - To respect the copyright of emoji designs, the Chat Demo/TUIKit project does not include cutouts of large emoji elements. Please replace them with your own designs or other emoji packs for which you hold the copyright before officially launching for commercial use. **The default smiley face emoji pack shown below is copyrighted by Tencent RTC** and is available for licensed use for a fee. If you need to obtain a license, please [contact us](https://trtc.io/contact).
|
|
8
|
+
|
|
9
|
+
> 
|
|
10
|
+
>
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
You can freely choose between the classic or minimalist UI components according to your needs. If you are not familiar with the effects of the interface libraries, you can refer to the document [TUIKit Overview](https://www.tencentcloud.com/document/product/1047/50062).
|
|
14
|
+
|
|
15
|
+
## Environment Requirements
|
|
16
|
+
- Xcode 10 or later
|
|
17
|
+
|
|
18
|
+
- iOS 9.0 or later
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
## CocoaPods Integration
|
|
22
|
+
1. Install CocoaPods
|
|
23
|
+
Enter the following command in a terminal (you need to install Ruby on your Mac first):
|
|
24
|
+
|
|
25
|
+
``` bash
|
|
26
|
+
sudo gem install cocoapods
|
|
27
|
+
```
|
|
28
|
+
2. Create a Podfile
|
|
29
|
+
Go to the path where the project is located and run the following command. Then, a Podfile will appear under the project path.
|
|
30
|
+
|
|
31
|
+
``` bash
|
|
32
|
+
pod init
|
|
33
|
+
```
|
|
34
|
+
3. Add the corresponding TUIKit components to your Podfile according to your needs. Components are independent of each other, and adding or removing them will not affect project compilation. You can choose different Podfile integration methods as needed:
|
|
35
|
+
|
|
36
|
+
- Remote CocoaPods Integration
|
|
37
|
+
|
|
38
|
+
- Local Integration of DevelopmentPods
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
The pros and cons of the above two integration methods are shown in the following table:
|
|
42
|
+
|
|
43
|
+
<table>
|
|
44
|
+
<tr>
|
|
45
|
+
<td rowspan="1" colSpan="1" >Integration methods</td>
|
|
46
|
+
|
|
47
|
+
<td rowspan="1" colSpan="1" >Suitable Scenarios</td>
|
|
48
|
+
|
|
49
|
+
<td rowspan="1" colSpan="1" >Advantage</td>
|
|
50
|
+
|
|
51
|
+
<td rowspan="1" colSpan="1" >Disadvantage</td>
|
|
52
|
+
</tr>
|
|
53
|
+
|
|
54
|
+
<tr>
|
|
55
|
+
<td rowspan="1" colSpan="1" >Remote CocoaPods Integration</td>
|
|
56
|
+
|
|
57
|
+
<td rowspan="1" colSpan="1" >Suitable for integration without source code modifications.</td>
|
|
58
|
+
|
|
59
|
+
<td rowspan="1" colSpan="1" >When there is a version update of TUIKit, you only need to `Pod update` again to complete the update.</td>
|
|
60
|
+
|
|
61
|
+
<td rowspan="1" colSpan="1" >When you have modifications to the source code, using `Pod update` to update will overwrite your modifications with the new version of TUIKit.</td>
|
|
62
|
+
</tr>
|
|
63
|
+
|
|
64
|
+
<tr>
|
|
65
|
+
<td rowspan="1" colSpan="1" >Local DevelopmentPods Integration</td>
|
|
66
|
+
|
|
67
|
+
<td rowspan="1" colSpan="1" >Suitable for customers who have custom modifications to the source code</td>
|
|
68
|
+
|
|
69
|
+
<td rowspan="1" colSpan="1" >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.</td>
|
|
70
|
+
|
|
71
|
+
<td rowspan="1" colSpan="1" >You need to manually overwrite your local TUIKit folder with the TUIKit source code to update.</td>
|
|
72
|
+
</tr>
|
|
73
|
+
</table>
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
### Remote CocoaPods
|
|
77
|
+
|
|
78
|
+
> **Note:**
|
|
79
|
+
>
|
|
80
|
+
|
|
81
|
+
> Swift language component support was introduced in TUIKit version 8.5.6870.
|
|
82
|
+
>
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
You can add components as needed in your Podfile:
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
【Minimalist version】
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
【Swift】
|
|
95
|
+
``` bash
|
|
96
|
+
# Uncomment the next line to define a global platform for your project
|
|
97
|
+
# ...
|
|
98
|
+
source 'https://github.com/CocoaPods/Specs.git'
|
|
99
|
+
platform :ios, '13.0'
|
|
100
|
+
# Prevent `*.xcassets` in TUIKit from conflicting with your project
|
|
101
|
+
install! 'cocoapods', :disable_input_output_paths => true
|
|
102
|
+
|
|
103
|
+
# Replace `your_project_name` with your actual project name
|
|
104
|
+
target 'your_project_name' do
|
|
105
|
+
use_frameworks!
|
|
106
|
+
use_modular_headers!
|
|
107
|
+
|
|
108
|
+
# Integrate the chat feature
|
|
109
|
+
pod 'TUIChat_Swift/UI_Minimalist'
|
|
110
|
+
# Integrate the conversation list feature
|
|
111
|
+
pod 'TUIConversation_Swift/UI_Minimalist'
|
|
112
|
+
# Integrate the relationship chain feature
|
|
113
|
+
pod 'TUIContact_Swift/UI_Minimalist'
|
|
114
|
+
# Integrate the search feature (To use this feature, you need to purchase the Pro edition 、Pro Plus edition or Enterprise edition)
|
|
115
|
+
pod 'TUISearch_Swift/UI_Minimalist'
|
|
116
|
+
# Integrate the audio/video call feature
|
|
117
|
+
pod 'TUICallKit_Swift'
|
|
118
|
+
# Integrate Translation Plugin(Value-added feature activation required, please contact Tencent Cloud Business to activate)
|
|
119
|
+
pod 'TUITranslationPlugin_Swift'
|
|
120
|
+
# Integrate Session Tagging Plugin
|
|
121
|
+
pod 'TUIConversationMarkPlugin_Swift'
|
|
122
|
+
# Integrate Speech-to-Text Plugin
|
|
123
|
+
pod 'TUIVoiceToTextPlugin_Swift'
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
#Pods config
|
|
127
|
+
post_install do |installer|
|
|
128
|
+
installer.pods_project.targets.each do |target|
|
|
129
|
+
target.build_configurations.each do |config|
|
|
130
|
+
#Fix Xcode14 Bundle target error
|
|
131
|
+
config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""
|
|
132
|
+
config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
|
|
133
|
+
config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
|
|
134
|
+
config.build_settings['ENABLE_BITCODE'] = "NO"
|
|
135
|
+
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = "13.0"
|
|
136
|
+
#Fix Xcode15 other links flag -ld64
|
|
137
|
+
xcode_version = `xcrun xcodebuild -version | grep Xcode | cut -d' ' -f2`.to_f
|
|
138
|
+
if xcode_version >= 15
|
|
139
|
+
xcconfig_path = config.base_configuration_reference.real_path
|
|
140
|
+
xcconfig = File.read(xcconfig_path)
|
|
141
|
+
if xcconfig.include?("OTHER_LDFLAGS") == false
|
|
142
|
+
xcconfig = xcconfig + "\n" + 'OTHER_LDFLAGS = $(inherited) "-ld64"'
|
|
143
|
+
else
|
|
144
|
+
if xcconfig.include?("OTHER_LDFLAGS = $(inherited)") == false
|
|
145
|
+
xcconfig = xcconfig.sub("OTHER_LDFLAGS", "OTHER_LDFLAGS = $(inherited)")
|
|
146
|
+
end
|
|
147
|
+
if xcconfig.include?("-ld64") == false
|
|
148
|
+
xcconfig = xcconfig.sub("OTHER_LDFLAGS = $(inherited)", 'OTHER_LDFLAGS = $(inherited) "-ld64"')
|
|
149
|
+
end
|
|
150
|
+
end
|
|
151
|
+
File.open(xcconfig_path, "w") { |file| file << xcconfig }
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
【Objective-C】
|
|
160
|
+
``` bash
|
|
161
|
+
# Uncomment the next line to define a global platform for your project
|
|
162
|
+
# ...
|
|
163
|
+
source 'https://github.com/CocoaPods/Specs.git'
|
|
164
|
+
platform :ios, '13.0'
|
|
165
|
+
# Prevent `*.xcassets` in TUIKit from conflicting with your project
|
|
166
|
+
install! 'cocoapods', :disable_input_output_paths => true
|
|
167
|
+
|
|
168
|
+
# Replace `your_project_name` with your actual project name
|
|
169
|
+
target 'your_project_name' do
|
|
170
|
+
# Comment the next line if you don't want to use dynamic frameworks
|
|
171
|
+
# TUIKit components are dependent on static libraries. Therefore, you need to mask the configuration.
|
|
172
|
+
# use_frameworks!
|
|
173
|
+
|
|
174
|
+
# Enable modular headers as needed. Only after you enable modular headers, the Pod module can be imported using @import.
|
|
175
|
+
# use_modular_headers!
|
|
176
|
+
|
|
177
|
+
# Integrate the chat feature
|
|
178
|
+
pod 'TUIChat/UI_Minimalist'
|
|
179
|
+
# Integrate the conversation list feature
|
|
180
|
+
pod 'TUIConversation/UI_Minimalist'
|
|
181
|
+
# Integrate the relationship chain feature
|
|
182
|
+
pod 'TUIContact/UI_Minimalist'
|
|
183
|
+
# Integrate the search feature (To use this feature, you need to purchase the Pro edition 、Pro Plus edition or Enterprise edition)
|
|
184
|
+
pod 'TUISearch/UI_Minimalist'
|
|
185
|
+
# Integrate the audio/video call feature
|
|
186
|
+
pod 'TUICallKit_Swift'
|
|
187
|
+
# Integrate Translation Plugin, supported starting from version 7.2 (Value-added feature activation required, please contact Tencent Cloud Business to activate)
|
|
188
|
+
pod 'TUITranslationPlugin'
|
|
189
|
+
# Integrate Session Tagging Plugin, supported starting from version 7.3
|
|
190
|
+
pod 'TUIConversationMarkPlugin'
|
|
191
|
+
# Integrate Speech-to-Text Plugin, supported starting from version 7.5
|
|
192
|
+
pod 'TUIVoiceToTextPlugin'
|
|
193
|
+
# Integrate message push plugin, supported starting from version 7.6
|
|
194
|
+
pod 'TIMPush'
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
#Pods config
|
|
198
|
+
post_install do |installer|
|
|
199
|
+
installer.pods_project.targets.each do |target|
|
|
200
|
+
target.build_configurations.each do |config|
|
|
201
|
+
#Fix Xcode14 Bundle target error
|
|
202
|
+
config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""
|
|
203
|
+
config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
|
|
204
|
+
config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
|
|
205
|
+
config.build_settings['ENABLE_BITCODE'] = "NO"
|
|
206
|
+
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = "13.0"
|
|
207
|
+
#Fix Xcode15 other links flag -ld64
|
|
208
|
+
xcode_version = `xcrun xcodebuild -version | grep Xcode | cut -d' ' -f2`.to_f
|
|
209
|
+
if xcode_version >= 15
|
|
210
|
+
xcconfig_path = config.base_configuration_reference.real_path
|
|
211
|
+
xcconfig = File.read(xcconfig_path)
|
|
212
|
+
if xcconfig.include?("OTHER_LDFLAGS") == false
|
|
213
|
+
xcconfig = xcconfig + "\n" + 'OTHER_LDFLAGS = $(inherited) "-ld64"'
|
|
214
|
+
else
|
|
215
|
+
if xcconfig.include?("OTHER_LDFLAGS = $(inherited)") == false
|
|
216
|
+
xcconfig = xcconfig.sub("OTHER_LDFLAGS", "OTHER_LDFLAGS = $(inherited)")
|
|
217
|
+
end
|
|
218
|
+
if xcconfig.include?("-ld64") == false
|
|
219
|
+
xcconfig = xcconfig.sub("OTHER_LDFLAGS = $(inherited)", 'OTHER_LDFLAGS = $(inherited) "-ld64"')
|
|
220
|
+
end
|
|
221
|
+
end
|
|
222
|
+
File.open(xcconfig_path, "w") { |file| file << xcconfig }
|
|
223
|
+
end
|
|
224
|
+
end
|
|
225
|
+
end
|
|
226
|
+
end
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
【Classic version】
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
【Swift】
|
|
235
|
+
``` bash
|
|
236
|
+
# Uncomment the next line to define a global platform for your project
|
|
237
|
+
source 'https://github.com/CocoaPods/Specs.git'
|
|
238
|
+
platform :ios, '13.0'
|
|
239
|
+
# Prevent `*.xcassets` in TUIKit from conflicting with your project
|
|
240
|
+
install! 'cocoapods', :disable_input_output_paths => true
|
|
241
|
+
|
|
242
|
+
# Replace `your_project_name` with your actual project name
|
|
243
|
+
target 'your_project_name' do
|
|
244
|
+
# Comment the next line if you don't want to use dynamic frameworks
|
|
245
|
+
use_frameworks!
|
|
246
|
+
use_modular_headers!
|
|
247
|
+
|
|
248
|
+
# Integrate the chat feature
|
|
249
|
+
pod 'TUIChat_Swift/UI_Classic'
|
|
250
|
+
# Integrate the conversation list feature
|
|
251
|
+
pod 'TUIConversation_Swift/UI_Classic'
|
|
252
|
+
# Integrate the relationship chain feature
|
|
253
|
+
pod 'TUIContact_Swift/UI_Classic'
|
|
254
|
+
# Integrate the search feature (To use this feature, you need to purchase the Pro edition 、Pro Plus edition or Enterprise edition)
|
|
255
|
+
pod 'TUISearch_Swift/UI_Classic'
|
|
256
|
+
# Integrate the audio/video call feature
|
|
257
|
+
pod 'TUICallKit_Swift'
|
|
258
|
+
# Integrate Voting Plugin
|
|
259
|
+
pod 'TUIPollPlugin_Swift'
|
|
260
|
+
# Integrate Group Chain Plugin
|
|
261
|
+
pod 'TUIGroupNotePlugin_Swift'
|
|
262
|
+
# Integrate Translation Plugin (Value-added feature activation required, please contact Tencent Cloud Business to activate)
|
|
263
|
+
pod 'TUITranslationPlugin_Swift'
|
|
264
|
+
# Integrate Session Grouping Plugin
|
|
265
|
+
pod 'TUIConversationGroupPlugin_Swift'
|
|
266
|
+
# Integrate Session Tagging Plugin
|
|
267
|
+
pod 'TUIConversationMarkPlugin_Swift'
|
|
268
|
+
# Integrate Speech-to-Text Plugin
|
|
269
|
+
pod 'TUIVoiceToTextPlugin_Swift'
|
|
270
|
+
# Integrate Customer Service Plugin
|
|
271
|
+
pod 'TUICustomerServicePlugin_Swift'
|
|
272
|
+
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
#Pods config
|
|
276
|
+
post_install do |installer|
|
|
277
|
+
installer.pods_project.targets.each do |target|
|
|
278
|
+
target.build_configurations.each do |config|
|
|
279
|
+
#Fix Xcode14 Bundle target error
|
|
280
|
+
config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""
|
|
281
|
+
config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
|
|
282
|
+
config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
|
|
283
|
+
config.build_settings['ENABLE_BITCODE'] = "NO"
|
|
284
|
+
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = "13.0"
|
|
285
|
+
#Fix Xcode15 other links flag -ld64
|
|
286
|
+
xcode_version = `xcrun xcodebuild -version | grep Xcode | cut -d' ' -f2`.to_f
|
|
287
|
+
if xcode_version >= 15
|
|
288
|
+
xcconfig_path = config.base_configuration_reference.real_path
|
|
289
|
+
xcconfig = File.read(xcconfig_path)
|
|
290
|
+
if xcconfig.include?("OTHER_LDFLAGS") == false
|
|
291
|
+
xcconfig = xcconfig + "\n" + 'OTHER_LDFLAGS = $(inherited) "-ld64"'
|
|
292
|
+
else
|
|
293
|
+
if xcconfig.include?("OTHER_LDFLAGS = $(inherited)") == false
|
|
294
|
+
xcconfig = xcconfig.sub("OTHER_LDFLAGS", "OTHER_LDFLAGS = $(inherited)")
|
|
295
|
+
end
|
|
296
|
+
if xcconfig.include?("-ld64") == false
|
|
297
|
+
xcconfig = xcconfig.sub("OTHER_LDFLAGS = $(inherited)", 'OTHER_LDFLAGS = $(inherited) "-ld64"')
|
|
298
|
+
end
|
|
299
|
+
end
|
|
300
|
+
File.open(xcconfig_path, "w") { |file| file << xcconfig }
|
|
301
|
+
end
|
|
302
|
+
end
|
|
303
|
+
end
|
|
304
|
+
end
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
【Objective-C】
|
|
309
|
+
``` bash
|
|
310
|
+
# Uncomment the next line to define a global platform for your project
|
|
311
|
+
source 'https://github.com/CocoaPods/Specs.git'
|
|
312
|
+
platform :ios, '13.0'
|
|
313
|
+
# Prevent `*.xcassets` in TUIKit from conflicting with your project
|
|
314
|
+
install! 'cocoapods', :disable_input_output_paths => true
|
|
315
|
+
|
|
316
|
+
# Replace `your_project_name` with your actual project name
|
|
317
|
+
target 'your_project_name' do
|
|
318
|
+
# Comment the next line if you don't want to use dynamic frameworks
|
|
319
|
+
# TUIKit components are dependent on static libraries. Therefore, you need to mask the configuration.
|
|
320
|
+
# use_frameworks!
|
|
321
|
+
|
|
322
|
+
# Enable modular headers as needed. Only after you enable modular headers, the Pod module can be imported using @import.
|
|
323
|
+
# use_modular_headers!
|
|
324
|
+
|
|
325
|
+
# Integrate the chat feature
|
|
326
|
+
pod 'TUIChat/UI_Classic'
|
|
327
|
+
# Integrate the conversation list feature
|
|
328
|
+
pod 'TUIConversation/UI_Classic'
|
|
329
|
+
# Integrate the relationship chain feature
|
|
330
|
+
pod 'TUIContact/UI_Classic'
|
|
331
|
+
# Integrate the search feature (To use this feature, you need to purchase the Pro edition 、Pro Plus edition or Enterprise edition)
|
|
332
|
+
pod 'TUISearch/UI_Classic'
|
|
333
|
+
# Integrate the audio/video call feature
|
|
334
|
+
pod 'TUICallKit_Swift'
|
|
335
|
+
# Integrate Voting Plugin, supported starting from version 7.1
|
|
336
|
+
pod 'TUIPollPlugin'
|
|
337
|
+
# Integrate Group Chain Plugin, supported starting from version 7.1
|
|
338
|
+
pod 'TUIGroupNotePlugin'
|
|
339
|
+
# Integrate Translation Plugin, supported starting from version 7.2 (Value-added feature activation required, please contact Tencent Cloud Business to activate)
|
|
340
|
+
pod 'TUITranslationPlugin'
|
|
341
|
+
# Integrate Session Grouping Plugin, supported starting from version 7.3
|
|
342
|
+
pod 'TUIConversationGroupPlugin'
|
|
343
|
+
# Integrate Session Tagging Plugin, supported starting from version 7.3
|
|
344
|
+
pod 'TUIConversationMarkPlugin'
|
|
345
|
+
# Integrate Speech-to-Text Plugin, supported starting from version 7.5
|
|
346
|
+
pod 'TUIVoiceToTextPlugin'
|
|
347
|
+
# Integrate Customer Service Plugin, supported starting from version 7.6
|
|
348
|
+
pod 'TUICustomerServicePlugin'
|
|
349
|
+
# Integrate message push plugin, supported starting from version 7.6
|
|
350
|
+
pod 'TIMPush'
|
|
351
|
+
|
|
352
|
+
end
|
|
353
|
+
|
|
354
|
+
#Pods config
|
|
355
|
+
post_install do |installer|
|
|
356
|
+
installer.pods_project.targets.each do |target|
|
|
357
|
+
target.build_configurations.each do |config|
|
|
358
|
+
#Fix Xcode14 Bundle target error
|
|
359
|
+
config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""
|
|
360
|
+
config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
|
|
361
|
+
config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
|
|
362
|
+
config.build_settings['ENABLE_BITCODE'] = "NO"
|
|
363
|
+
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = "13.0"
|
|
364
|
+
#Fix Xcode15 other links flag -ld64
|
|
365
|
+
xcode_version = `xcrun xcodebuild -version | grep Xcode | cut -d' ' -f2`.to_f
|
|
366
|
+
if xcode_version >= 15
|
|
367
|
+
xcconfig_path = config.base_configuration_reference.real_path
|
|
368
|
+
xcconfig = File.read(xcconfig_path)
|
|
369
|
+
if xcconfig.include?("OTHER_LDFLAGS") == false
|
|
370
|
+
xcconfig = xcconfig + "\n" + 'OTHER_LDFLAGS = $(inherited) "-ld64"'
|
|
371
|
+
else
|
|
372
|
+
if xcconfig.include?("OTHER_LDFLAGS = $(inherited)") == false
|
|
373
|
+
xcconfig = xcconfig.sub("OTHER_LDFLAGS", "OTHER_LDFLAGS = $(inherited)")
|
|
374
|
+
end
|
|
375
|
+
if xcconfig.include?("-ld64") == false
|
|
376
|
+
xcconfig = xcconfig.sub("OTHER_LDFLAGS = $(inherited)", 'OTHER_LDFLAGS = $(inherited) "-ld64"')
|
|
377
|
+
end
|
|
378
|
+
end
|
|
379
|
+
File.open(xcconfig_path, "w") { |file| file << xcconfig }
|
|
380
|
+
end
|
|
381
|
+
end
|
|
382
|
+
end
|
|
383
|
+
end
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
> **Indication**
|
|
389
|
+
>
|
|
390
|
+
> 1. If you directly use `pod 'TUIChat'` without specifying classic or minimalist, it will integrate both UI component versions by default.
|
|
391
|
+
> 2. The Classic and Minimalist UI cannot be mixed. When integrating multiple components, you must choose classic UI or minimalist UI at the same time. For instance, the Classic TUIChat component must be used with the Classic versions of the TUIConversation, TUIContact, and TUIGroup. Similarly, the Minimalist version of the TUIChat component must be paired with the Minimalist versions of the TUIConversation, TUIContact.
|
|
392
|
+
> 3. If you are using Swift, please enable `use_modular_headers!`, and change the header file reference to @import reference.
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
After modifying the Podfile, run the following command to install TUIKit.
|
|
396
|
+
``` bash
|
|
397
|
+
pod install
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
If you cannot install the latest version of TUIKit, run the following command to update the local CocoaPods repository.
|
|
401
|
+
``` bash
|
|
402
|
+
pod repo update
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
Then run the following command to update the Pod version of the component.
|
|
406
|
+
``` bash
|
|
407
|
+
pod update
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
After all TUIKit components are integrated, the project structure is as follows:
|
|
411
|
+
|
|
412
|
+

|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
> **Note:**
|
|
416
|
+
>
|
|
417
|
+
|
|
418
|
+
> If you encounter any errors in the process, you can refer to the FAQs at the end of the document.
|
|
419
|
+
>
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
### Local DevelopmentPods
|
|
423
|
+
1. Download TUIKit source code from GitHub. Drag it directly into your project directory:
|
|
424
|
+
|
|
425
|
+
1. [Swift TUIKit in Github](https://github.com/Tencent-RTC/Chat_UIKit/tree/main/Swift/TUIKit):
|
|
426
|
+
|
|
427
|
+

|
|
428
|
+
|
|
429
|
+
2. [Objective-C TUIKit in Github](https://github.com/TencentCloud/chat-uikit-ios/tree/main/TUIKit):
|
|
430
|
+
|
|
431
|
+

|
|
432
|
+
|
|
433
|
+
2. Modify the local path of each component in your Podfile. The path is the location of the TUIKit folder relative to your project's Podfile, commonly including:
|
|
434
|
+
|
|
435
|
+
- The TUIKit folder is located in the **parent directory** of your project's Podfile: `pod 'TUICore', :path => "../TUIKit/TUICore"`
|
|
436
|
+
|
|
437
|
+
- The TUIKit folder is located in the **current directory** of your project's Podfile: `pod 'TUICore', :path => "./TUIKit/TUICore"`
|
|
438
|
+
|
|
439
|
+
- The TUIKit folder is located in the **subdirectory** of your project's Podfile: ` pod 'TUICore', :path => "/TUIKit/TUICore"`
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
Taking the TUIKit folder located in the parent directory of your project's Podfile as an example:
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
【DevelopmentPodfile】
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
【Swift】
|
|
453
|
+
``` bash
|
|
454
|
+
ment# Uncomment the next line to define a global platform for your project
|
|
455
|
+
source 'https://github.com/CocoaPods/Specs.git'
|
|
456
|
+
platform :ios, '13.0'
|
|
457
|
+
install! 'cocoapods', :disable_input_output_paths => true
|
|
458
|
+
|
|
459
|
+
# Replace `your_project_name` with your actual project name
|
|
460
|
+
target 'your_project_name' do
|
|
461
|
+
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
|
|
462
|
+
use_frameworks!
|
|
463
|
+
use_modular_headers!
|
|
464
|
+
|
|
465
|
+
# Integrate the basic library (required)
|
|
466
|
+
pod 'TUICore', :path => "../TUIKit/TUICore"
|
|
467
|
+
pod 'TIMCommon_Swift', :path => "../TUIKit/TIMCommon"
|
|
468
|
+
|
|
469
|
+
# Integrate TUIKit components (optional)
|
|
470
|
+
# Integrate the chat feature
|
|
471
|
+
pod 'TUIChat_Swift', :path => "../TUIKit/TUIChat"
|
|
472
|
+
# Integrate the conversation list feature
|
|
473
|
+
pod 'TUIConversation_Swift', :path => "../TUIKit/TUIConversation"
|
|
474
|
+
# Integrate the relationship chain feature
|
|
475
|
+
pod 'TUIContact_Swift', :path => "../TUIKit/TUIContact"
|
|
476
|
+
# Integrate the search feature (To use this feature, you need to purchase the Ultimate edition)
|
|
477
|
+
pod 'TUISearch_Swift', :path => "../TUIKit/TUISearch"
|
|
478
|
+
# Integrate the audio/video call feature
|
|
479
|
+
pod 'TUICallKit_Swift'
|
|
480
|
+
|
|
481
|
+
# Integrate the TUIKitPlugin plugin (optional)
|
|
482
|
+
# Integrate translation plugin (Value-added feature activation is required. Please contact Tencent Cloud sales)
|
|
483
|
+
pod 'TUITranslationPlugin_Swift'
|
|
484
|
+
|
|
485
|
+
# Other Pods
|
|
486
|
+
pod 'MJRefresh'
|
|
487
|
+
pod 'SnapKit'
|
|
488
|
+
end
|
|
489
|
+
#Pods config
|
|
490
|
+
post_install do |installer|
|
|
491
|
+
installer.pods_project.targets.each do |target|
|
|
492
|
+
target.build_configurations.each do |config|
|
|
493
|
+
#Fix Xcode14 Bundle target error
|
|
494
|
+
config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""
|
|
495
|
+
config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
|
|
496
|
+
config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
|
|
497
|
+
config.build_settings['ENABLE_BITCODE'] = "NO"
|
|
498
|
+
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = "13.0"
|
|
499
|
+
#Fix Xcode15 other links flag -ld64
|
|
500
|
+
xcode_version = `xcrun xcodebuild -version | grep Xcode | cut -d' ' -f2`.to_f
|
|
501
|
+
if xcode_version >= 15
|
|
502
|
+
xcconfig_path = config.base_configuration_reference.real_path
|
|
503
|
+
xcconfig = File.read(xcconfig_path)
|
|
504
|
+
if xcconfig.include?("OTHER_LDFLAGS") == false
|
|
505
|
+
xcconfig = xcconfig + "\n" + 'OTHER_LDFLAGS = $(inherited) "-ld64"'
|
|
506
|
+
else
|
|
507
|
+
if xcconfig.include?("OTHER_LDFLAGS = $(inherited)") == false
|
|
508
|
+
xcconfig = xcconfig.sub("OTHER_LDFLAGS", "OTHER_LDFLAGS = $(inherited)")
|
|
509
|
+
end
|
|
510
|
+
if xcconfig.include?("-ld64") == false
|
|
511
|
+
xcconfig = xcconfig.sub("OTHER_LDFLAGS = $(inherited)", 'OTHER_LDFLAGS = $(inherited) "-ld64"')
|
|
512
|
+
end
|
|
513
|
+
end
|
|
514
|
+
File.open(xcconfig_path, "w") { |file| file << xcconfig }
|
|
515
|
+
end
|
|
516
|
+
end
|
|
517
|
+
end
|
|
518
|
+
end
|
|
519
|
+
```
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
【Objective-C】
|
|
523
|
+
``` bash
|
|
524
|
+
ment# Uncomment the next line to define a global platform for your project
|
|
525
|
+
source 'https://github.com/CocoaPods/Specs.git'
|
|
526
|
+
platform :ios, '13.0'
|
|
527
|
+
install! 'cocoapods', :disable_input_output_paths => true
|
|
528
|
+
|
|
529
|
+
# Replace `your_project_name` with your actual project name
|
|
530
|
+
target 'your_project_name' do
|
|
531
|
+
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
|
|
532
|
+
use_frameworks!
|
|
533
|
+
use_modular_headers!
|
|
534
|
+
|
|
535
|
+
# Integrate the basic library (required)
|
|
536
|
+
pod 'TUICore', :path => "../TUIKit/TUICore"
|
|
537
|
+
pod 'TIMCommon', :path => "../TUIKit/TIMCommon"
|
|
538
|
+
|
|
539
|
+
# Integrate TUIKit components (optional)
|
|
540
|
+
# Integrate the chat feature
|
|
541
|
+
pod 'TUIChat', :path => "../TUIKit/TUIChat"
|
|
542
|
+
# Integrate the conversation list feature
|
|
543
|
+
pod 'TUIConversation', :path => "../TUIKit/TUIConversation"
|
|
544
|
+
# Integrate the relationship chain feature
|
|
545
|
+
pod 'TUIContact', :path => "../TUIKit/TUIContact"
|
|
546
|
+
# Integrate the search feature (To use this feature, you need to purchase the Ultimate edition)
|
|
547
|
+
pod 'TUISearch', :path => "../TUIKit/TUISearch"
|
|
548
|
+
# Integrate the audio/video call feature
|
|
549
|
+
pod 'TUICallKit_Swift'
|
|
550
|
+
# Integrate the video conference feature
|
|
551
|
+
pod 'TUIRoomKit'
|
|
552
|
+
|
|
553
|
+
# Integrate the TUIKitPlugin plugin (optional)
|
|
554
|
+
# Note: The TUIKitPlugin plugin version must be the same as the TUICore version.
|
|
555
|
+
# Ensure that the plugin version matches spec.version in "../TUIKit/TUICore/TUICore.spec".
|
|
556
|
+
|
|
557
|
+
# Integrate the voting plugin, supported from version 7.1
|
|
558
|
+
pod 'TUIPollPlugin'
|
|
559
|
+
# Integrate the group chain plugin, supported from version 7.1
|
|
560
|
+
pod 'TUIGroupNotePlugin'
|
|
561
|
+
# Integrate translation plugin, supported from version 7.2 (Value-added feature activation is required. Please contact Tencent Cloud sales)
|
|
562
|
+
pod 'TUITranslationPlugin'
|
|
563
|
+
# Integrate the session grouping plugin, supported from version 7.3
|
|
564
|
+
pod 'TUIConversationGroupPlugin'
|
|
565
|
+
# Integrate the session tagging plugin, supported from version 7.3
|
|
566
|
+
pod 'TUIConversationMarkPlugin'
|
|
567
|
+
# Integrate the offline push feature
|
|
568
|
+
pod 'TIMPush'
|
|
569
|
+
|
|
570
|
+
# Other Pods
|
|
571
|
+
pod 'MJRefresh'
|
|
572
|
+
pod 'Masonry'
|
|
573
|
+
end
|
|
574
|
+
#Pods config
|
|
575
|
+
post_install do |installer|
|
|
576
|
+
installer.pods_project.targets.each do |target|
|
|
577
|
+
target.build_configurations.each do |config|
|
|
578
|
+
#Fix Xcode14 Bundle target error
|
|
579
|
+
config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""
|
|
580
|
+
config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
|
|
581
|
+
config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
|
|
582
|
+
config.build_settings['ENABLE_BITCODE'] = "NO"
|
|
583
|
+
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = "13.0"
|
|
584
|
+
#Fix Xcode15 other links flag -ld64
|
|
585
|
+
xcode_version = `xcrun xcodebuild -version | grep Xcode | cut -d' ' -f2`.to_f
|
|
586
|
+
if xcode_version >= 15
|
|
587
|
+
xcconfig_path = config.base_configuration_reference.real_path
|
|
588
|
+
xcconfig = File.read(xcconfig_path)
|
|
589
|
+
if xcconfig.include?("OTHER_LDFLAGS") == false
|
|
590
|
+
xcconfig = xcconfig + "\n" + 'OTHER_LDFLAGS = $(inherited) "-ld64"'
|
|
591
|
+
else
|
|
592
|
+
if xcconfig.include?("OTHER_LDFLAGS = $(inherited)") == false
|
|
593
|
+
xcconfig = xcconfig.sub("OTHER_LDFLAGS", "OTHER_LDFLAGS = $(inherited)")
|
|
594
|
+
end
|
|
595
|
+
if xcconfig.include?("-ld64") == false
|
|
596
|
+
xcconfig = xcconfig.sub("OTHER_LDFLAGS = $(inherited)", 'OTHER_LDFLAGS = $(inherited) "-ld64"')
|
|
597
|
+
end
|
|
598
|
+
end
|
|
599
|
+
File.open(xcconfig_path, "w") { |file| file << xcconfig }
|
|
600
|
+
end
|
|
601
|
+
end
|
|
602
|
+
end
|
|
603
|
+
end
|
|
604
|
+
```
|
|
605
|
+
|
|
606
|
+
3. After modifying the Podfile, run the following command to install the local TUIKit components. Example:
|
|
607
|
+
|
|
608
|
+
``` bash
|
|
609
|
+
pod install
|
|
610
|
+
```
|
|
611
|
+
|
|
612
|
+
> **Note:**
|
|
613
|
+
>
|
|
614
|
+
> 4. When using the local integration solution, if you need to upgrade, you must obtain the latest souce code from Github and overwrite the TUIKit directory in your local project.
|
|
615
|
+
> 5. When private modifications conflict with the remote version, manual merging is required to resolve conflicts.
|
|
616
|
+
> 6. The TUIKit plugin relies on the version of TUICore, so please ensure that the plugin version matches the spec.version in "../TUIKit/TUICore/TUICore.spec".
|
|
617
|
+
|
|
618
|
+
|
|
619
|
+
## Third-party Library Dependencies
|
|
620
|
+
|
|
621
|
+
The minimum version requirements for third-party libraries depended on by TUIKit are as follows. If your version is lower, please upgrade to the latest version.
|
|
622
|
+
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
|
|
626
|
+
【Swift】
|
|
627
|
+
``` plaintext
|
|
628
|
+
- MJExtension (3.4.1)
|
|
629
|
+
- MJRefresh (3.7.5)
|
|
630
|
+
- SnapKit (5.7.1)
|
|
631
|
+
- SSZipArchive (2.4.3)
|
|
632
|
+
- SDWebImage (5.18.11)
|
|
633
|
+
```
|
|
634
|
+
|
|
635
|
+
|
|
636
|
+
【Objective-C】
|
|
637
|
+
``` plaintext
|
|
638
|
+
- Masonry (1.1.0)
|
|
639
|
+
- MJExtension (3.4.1)
|
|
640
|
+
- MJRefresh (3.7.5)
|
|
641
|
+
- ReactiveObjC (3.1.1)
|
|
642
|
+
- SDWebImage (5.18.11):
|
|
643
|
+
- SDWebImage/Core (= 5.18.11)
|
|
644
|
+
- SDWebImage/Core (5.18.11)
|
|
645
|
+
- SnapKit (5.6.0)
|
|
646
|
+
- SSZipArchive (2.4.3)
|
|
647
|
+
```
|
|
648
|
+
|
|
649
|
+
## Build Basic Interfaces
|
|
650
|
+
|
|
651
|
+
After integrating TUIKit, if you want to continue building basic interfaces for chat, conversation list, etc., please refer to the document: [Build Chat](https://www.tencentcloud.com/document/product/1047/61215), [Build Conversation List.](https://www.tencentcloud.com/document/product/1047/61217)
|
|
652
|
+
|
|
653
|
+
## FAQs
|
|
654
|
+
|
|
655
|
+
### Xcode Issues
|
|
656
|
+
- **Integration error: [Xcodeproj] Unknown object version (60). (RuntimeError)**
|
|
657
|
+
|
|
658
|
+

|
|
659
|
+
|
|
660
|
+
|
|
661
|
+
When integrating TUIKit in a new project created with Xcode15 and entering `pod install`, you may encounter this issue due to using an older version of CocoaPods. There are two solutions:
|
|
662
|
+
|
|
663
|
+
|
|
664
|
+
Solution 1: Change the Xcode project's `Project Format` version to Xcode13.0.
|
|
665
|
+
|
|
666
|
+

|
|
667
|
+
|
|
668
|
+
|
|
669
|
+
Solution 2: Upgrade your local version of CocoaPods. The upgrade method will not be elaborated here.
|
|
670
|
+
|
|
671
|
+
- **Assertion failed: (false && "compact unwind compressed function offset doesn't fit in 24 bits"), function operator(), file Layout.cpp.**
|
|
672
|
+
|
|
673
|
+

|
|
674
|
+
|
|
675
|
+
|
|
676
|
+
Or, when integrating TUIRoom with XCode15, the latest linker causes symbol conflicts in TUIRoomEngine, which is also part of this issue.
|
|
677
|
+
|
|
678
|
+

|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
Solution: Modify the linker configuration. In `Build Settings`, add `-ld64` to `Other Linker Flags`.
|
|
682
|
+
|
|
683
|
+
|
|
684
|
+
Official Documentation: [https://developer.apple.com/forums/thread/735426](https://links.jianshu.com/go?to=https%3A%2F%2Fdeveloper.apple.com%2Fforums%2Fthread%2F735426)
|
|
685
|
+
|
|
686
|
+

|
|
687
|
+
|
|
688
|
+
- **Rosetta Simulator Issue**
|
|
689
|
+
|
|
690
|
+
|
|
691
|
+
When using Apple Silicon (M1, M2, etc. series chips), you'll encounter this type of popup. The reason is that some third-party libraries, including SDWebImage, do not support xcframework. However, Apple has still provided an adaptation method, which is to enable Rosetta settings on the emulator. Generally, the Rosetta option will automatically pop up during compilation.
|
|
692
|
+
|
|
693
|
+

|
|
694
|
+
|
|
695
|
+
- **Xcode 15 Developer Sandbox Option Error: Sandbox: bash(xxx) deny(1) file-write-create**
|
|
696
|
+
|
|
697
|
+

|
|
698
|
+
|
|
699
|
+
|
|
700
|
+
When you create a new project using Xcode 15, this option may cause compilation and execution failure. It is recommended that you turn off this option.
|
|
701
|
+
|
|
702
|
+

|
|
703
|
+
|
|
704
|
+
- **Xcode 16 does not support enabling bitcode for Frameworks**
|
|
705
|
+
|
|
706
|
+
|
|
707
|
+
**Solution 1: Upgrade the SDK**
|
|
708
|
+
|
|
709
|
+
|
|
710
|
+
If you are using an old version SDK with Bitcode (e.g., TXIMSDK_iOS), it is recommended to follow this document and upgrade the SDK to TXIMSDK_Plus_iOS_XCFramework.
|
|
711
|
+
|
|
712
|
+
|
|
713
|
+
**Solution 2: Modify the Podfile**
|
|
714
|
+
|
|
715
|
+
|
|
716
|
+
Add the following configuration to the end of your Podfile and run pod install again.
|
|
717
|
+
|
|
718
|
+
``` java
|
|
719
|
+
post_install do |installer|
|
|
720
|
+
bitcode_strip_path = 'xcrun --find bitcode_strip'.chop!
|
|
721
|
+
def strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
|
|
722
|
+
framework_path = File.join(Dir.pwd, framework_relative_path)
|
|
723
|
+
command = "#{bitcode_strip_path} #{framework_path} -r -o #{framework_path}"
|
|
724
|
+
puts "Stripping bitcode: #{command}"
|
|
725
|
+
system(command)
|
|
726
|
+
end
|
|
727
|
+
framework_paths = [
|
|
728
|
+
"/Pods/TXIMSDK_iOS/ImSDK.framework/ImSDK",
|
|
729
|
+
]
|
|
730
|
+
framework_paths.each do |framework_relative_path|
|
|
731
|
+
strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
|
|
732
|
+
end
|
|
733
|
+
end
|
|
734
|
+
```
|
|
735
|
+
|
|
736
|
+
### CocoaPods Issues
|
|
737
|
+
- **When using remote integration, issues with mismatched Pod dependency versions**
|
|
738
|
+
|
|
739
|
+
|
|
740
|
+
If you encounter a mismatch between the Podfile.lock and the plugin dependency version of TUICore while using remote CocoaPods integration,
|
|
741
|
+
|
|
742
|
+
|
|
743
|
+
please delete the Podfile.lock file and use `pod repo update`to update your local repository, then use `pod update` to refresh the updates.
|
|
744
|
+
|
|
745
|
+

|
|
746
|
+
|
|
747
|
+
- **When using local integration, issues with mismatched Pod dependency versions**
|
|
748
|
+
|
|
749
|
+
|
|
750
|
+
When integrating local DevelopmentPods and the plugin dependency on TUICoreis newer, but the local Pod dependency version is 1.0.0,
|
|
751
|
+
|
|
752
|
+
|
|
753
|
+
Please refer to [Podfile_local](https://github.com/TencentCloud/chat-uikit-ios/blob/main/Demo/Podfile_local) and [TUICore.spec](https://github.com/TencentCloud/chat-uikit-ios/blob/main/TUIKit/TUICore/TUICore.podspec) for modifications. The plugin needs to follow the version and match the one in TUICore.spec.
|
|
754
|
+
|
|
755
|
+
|
|
756
|
+
When using local integration for the first time, we recommend you download our sample Demo project, replace the content of the Podfile with Podfile_local, and execute `Pod update` for cross-reference.
|
|
757
|
+
|
|
758
|
+

|
|
759
|
+
|
|
760
|
+
|
|
761
|
+
### Submission Issues
|
|
762
|
+
- **Packaging failure when launching on the Appstore, with an 'Unsupported Architectures' error message.**
|
|
763
|
+
|
|
764
|
+
|
|
765
|
+
The issue is illustrated below, where packaging indicates the ImSDK_Plus.framework includes an x86_64 simulator version not supported by the Appstore. This is because the SDK, to facilitate developer debugging, defaults to including the simulator version upon release.
|
|
766
|
+
|
|
767
|
+

|
|
768
|
+
|
|
769
|
+
|
|
770
|
+
You can follow the steps below to remove the simulator version during packaging:
|
|
771
|
+
|
|
772
|
+
1. Select your project's Target and click on the `Build Phases` option, then add a `Run Script` to the current panel;
|
|
773
|
+
|
|
774
|
+

|
|
775
|
+
|
|
776
|
+
2. In the newly added Run Script, insert the following script:
|
|
777
|
+
|
|
778
|
+
``` bash
|
|
779
|
+
#!/bin/sh
|
|
780
|
+
|
|
781
|
+
# Strip invalid architectures
|
|
782
|
+
strip_invalid_archs() {
|
|
783
|
+
binary="$1"
|
|
784
|
+
echo "current binary ${binary}"
|
|
785
|
+
# Get architectures for current file
|
|
786
|
+
archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)"
|
|
787
|
+
stripped=""
|
|
788
|
+
for arch in $archs; do
|
|
789
|
+
if ! [[ "${ARCHS}" == *"$arch"* ]]; then
|
|
790
|
+
if [ -f "$binary" ]; then
|
|
791
|
+
# Strip non-valid architectures in-place
|
|
792
|
+
lipo -remove "$arch" -output "$binary" "$binary" || exit 1
|
|
793
|
+
stripped="$stripped $arch"
|
|
794
|
+
fi
|
|
795
|
+
fi
|
|
796
|
+
done
|
|
797
|
+
if [[ "$stripped" ]]; then
|
|
798
|
+
echo "Stripped $binary of architectures:$stripped"
|
|
799
|
+
fi
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}"
|
|
803
|
+
|
|
804
|
+
# This script loops through the frameworks embedded in the application and
|
|
805
|
+
# removes unused architectures.
|
|
806
|
+
find "$APP_PATH" -name '*.framework' -type d | while read -r FRAMEWORK
|
|
807
|
+
do
|
|
808
|
+
FRAMEWORK_EXECUTABLE_NAME=$(defaults read "$FRAMEWORK/Info.plist" CFBundleExecutable)
|
|
809
|
+
FRAMEWORK_EXECUTABLE_PATH="$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME"
|
|
810
|
+
echo "Executable is $FRAMEWORK_EXECUTABLE_PATH"
|
|
811
|
+
strip_invalid_archs "$FRAMEWORK_EXECUTABLE_PATH"
|
|
812
|
+
done
|
|
813
|
+
```
|
|
814
|
+

|
|
815
|
+
|
|
816
|
+
|
|
817
|
+
### TUICallKit Issues
|
|
818
|
+
- **What should I do if TUICallKit conflicts with an audio/video library that I have integrated?**
|
|
819
|
+
|
|
820
|
+
|
|
821
|
+
Tencent Cloud's audio and video libraries cannot be integrated simultaneously due to possible symbol conflicts. These can be addressed as follows.
|
|
822
|
+
|
|
823
|
+
1. If you have integrated the `TXLiteAVSDK_TRTC` library, a symbol conflict will not occur. You can directly add the dependency in Podfile:
|
|
824
|
+
|
|
825
|
+
``` ruby
|
|
826
|
+
pod 'TUICallKit_Swift'
|
|
827
|
+
```
|
|
828
|
+
2. If you have integrated the `TXLiteAVSDK_Professional` library, a symbol conflict will occur. You can add the dependency in Podfile:
|
|
829
|
+
|
|
830
|
+
``` ruby
|
|
831
|
+
pod 'TUICallKit_Swift/Professional'
|
|
832
|
+
```
|
|
833
|
+
3. If you have integrated the `TXLiteAVSDK_Enterprise` library, a symbol conflict will occur. It is recommended to upgrade to `TXLiteAVSDK_Professional` and then use TUICallKit_Swift/Professional.
|
|
834
|
+
|
|
835
|
+
- **How long is the default duration for call invitation timeouts?**
|
|
836
|
+
|
|
837
|
+
|
|
838
|
+
The default timeout duration for a call invitation is 30 seconds.
|
|
839
|
+
|
|
840
|
+
- **During the invitation timeout period, can the invitee immediately receive the invitation if they go offline and then online?**
|
|
841
|
+
|
|
842
|
+
|
|
843
|
+
1.If the call invitation is started in a one-to-one chat, the invitee can receive the call invitation, and the TUIKit will automatically open the call invitation UI internally.
|
|
844
|
+
|
|
845
|
+
|
|
846
|
+
2.If the call invitation is for a group chat, the invitee will automatically fetch invitations from the last 30 seconds upon going online again, and the TUIKit will automatically trigger the group call interface.3.
|
|
847
|
+
|
|
848
|
+
|
|
849
|
+
## Contact Us
|
|
850
|
+
|
|
851
|
+
If you have any questions about this article, feel free to join the [Telegram Technical Group](https://t.me/+EPk6TMZEZMM5OGY1), where you will receive reliable technical support.
|
|
852
|
+
|