@tencent-rtc/mcp 1.3.3 → 1.3.5
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/package.json +1 -1
- package/resource/doc/chatuikit/android/features/theme.md +363 -0
- package/resource/doc/chatuikit/{android/client_api_Android.md → faq/android_sdk/client-api.md} +0 -2
- package/resource/doc/chatuikit/faq/common/product.md +8 -0
- package/resource/doc/chatuikit/faq/flutter_sdk/faq.md +53 -0
- package/resource/doc/chatuikit/{iOS/client_api_iOS.md → faq/ios_sdk/client-api.md} +0 -2
- package/resource/doc/chatuikit/flutter/features/theme.md +379 -0
- package/resource/doc/chatuikit/flutter/integration.md +413 -0
- package/resource/doc/chatuikit/flutter/workflow.md +941 -0
- package/resource/doc/chatuikit/iOS/features/theme.md +416 -0
- package/resource/doc/chatuikit/iOS/workflow.md +0 -0
- package/resource/doc/chatuikit/react/components/chat-setting.md +86 -0
- package/resource/doc/chatuikit/react/components/contact-list.md +1093 -0
- package/resource/doc/chatuikit/react/components/search.md +745 -0
- package/resource/doc/chatuikit/vue/components/chat-setting.md +64 -0
- package/resource/doc/chatuikit/vue/components/contact-list.md +679 -0
- package/resource/doc/chatuikit/vue/components/search.md +1384 -0
- package/resource/doc/livekit/live/android/workflow.md +137 -6
- package/resource/doc/livekit/live/ios/live-audience-list.md +339 -0
- package/resource/doc/livekit/live/ios/live-audio-effect.md +370 -0
- package/resource/doc/livekit/live/ios/live-barrage.md +517 -0
- package/resource/doc/livekit/live/ios/live-base-beauty.md +247 -0
- package/resource/doc/livekit/live/ios/live-co-guest-interaction.md +518 -0
- package/resource/doc/livekit/live/ios/live-gift.md +783 -0
- package/resource/doc/livekit/live/ios/live-host-interaction.md +815 -0
- package/resource/doc/livekit/live/ios/live-integration.md +931 -0
- package/resource/doc/livekit/live/ios/live-live-list.md +485 -0
- package/resource/doc/livekit/live/ios/workflow.md +454 -0
- package/resource/doc/rtcengine/web/plugin/20-advanced-customized-capture-rendering.md +87 -0
- package/resource/doc/rtcengine/web/plugin/21-advanced-auto-play-policy.md +87 -0
- package/resource/doc/rtcengine/web/plugin/22-advanced-audio-mixer.md +175 -0
- package/resource/doc/rtcengine/web/plugin/23-advanced-support-detection.md +221 -0
- package/resource/doc/rtcengine/web/plugin/24-advanced-network-quality.md +140 -0
- package/resource/doc/rtcengine/web/plugin/25-advanced-device-change.md +99 -0
- package/resource/doc/rtcengine/web/plugin/26-advanced-publish-cdn-stream.md +451 -0
- package/resource/doc/rtcengine/web/plugin/27-advanced-small-stream.md +151 -0
- package/resource/doc/rtcengine/web/plugin/28-advanced-beauty.md +322 -0
- package/resource/doc/rtcengine/web/plugin/29-advanced-water-mark.md +149 -0
- package/resource/doc/rtcengine/web/plugin/30-advanced-cross-room-link.md +96 -0
- package/resource/doc/rtcengine/web/plugin/31-advanced-plugins-overview.md +330 -0
- package/resource/doc/rtcengine/web/plugin/34-advanced-proxy.md +248 -0
- package/resource/doc/rtcengine/web/plugin/35-advanced-ai-denoiser.md +81 -0
- package/resource/doc/rtcengine/web/plugin/36-advanced-virtual-background.md +242 -0
- package/resource/doc/rtcengine/web/plugin/37-advanced-voice-changer.md +99 -0
- package/resource/doc/rtcengine/web/plugin/39-advanced-video-decoder.md +33 -0
- package/resource/doc/rtcengine/web/plugin/40-advanced-video-mixer.md +379 -0
- package/resource/doc/rtcengine/web/plugin/41-advanced-small-stream-auto-switcher.md +91 -0
- package/resource/doc/rtcengine/web/plugin/42-advanced-realtime-transcriber.md +315 -0
- package/resource/doc/rtcengine/web/plugin/43-advanced-face-detection.md +180 -0
- package/tools/chat/get-native-chat-feature-detail.js +30 -0
- package/tools/chat/get-native-chat-feature-detail.js.map +1 -0
- package/tools/chat/get-native-chat-integration.js +30 -12
- package/tools/chat/get-native-chat-integration.js.map +1 -1
- package/tools/common/get-faq.js +2 -4
- package/tools/common/get-faq.js.map +1 -1
- package/tools/definitions/get_native_chat_feature_detail_def.js +32 -0
- package/tools/definitions/get_native_chat_feature_detail_def.js.map +1 -0
- package/tools/definitions/get_native_chat_uikit_integration_def.js +19 -7
- package/tools/definitions/get_native_chat_uikit_integration_def.js.map +1 -1
- package/tools/definitions/{get_native_live_extra_features_def.js → get_native_live_uikit_extra_features_def.js} +3 -3
- package/tools/definitions/get_native_live_uikit_extra_features_def.js.map +1 -0
- package/tools/definitions/{get_native_live_interaction_def.js → get_native_live_uikit_interaction_def.js} +3 -3
- package/tools/definitions/get_native_live_uikit_interaction_def.js.map +1 -0
- package/tools/definitions/get_web_chat_uikit_component_detail_def.js +49 -10
- package/tools/definitions/get_web_chat_uikit_component_detail_def.js.map +1 -1
- package/tools/definitions/record_prompt_def.js +42 -11
- package/tools/definitions/record_prompt_def.js.map +1 -1
- package/tools/definitions/record_result_def.js +1 -1
- package/tools/index.js +6 -4
- package/tools/index.js.map +1 -1
- package/tools/live/{get_native_live_extra_features.js → get_native_live_uikit_extra_features.js} +4 -4
- package/tools/live/get_native_live_uikit_extra_features.js.map +1 -0
- package/tools/live/{get_native_live_interaction.js → get_native_live_uikit_interaction.js} +4 -4
- package/tools/live/get_native_live_uikit_interaction.js.map +1 -0
- package/tools/rtcengine/get-rtcengine-web-sdk-integration.js.map +1 -1
- package/tools/rtcengine/get-trtc-sdk-faq.js +32 -0
- package/tools/rtcengine/get-trtc-sdk-faq.js.map +1 -0
- package/tools/rtcengine/get-trtc-web-sdk-faq.js +1 -1
- package/tools/rtcengine/get-trtc-web-sdk-integration.js.map +1 -1
- package/tools/rtcengine/get-trtc-web-sdk-plugin.js +45 -0
- package/tools/rtcengine/get-trtc-web-sdk-plugin.js.map +1 -0
- package/utils/handle-component-name.js +0 -16
- package/utils/handle-component-name.js.map +1 -1
- package/utils/report-cls-client.js +1 -1
- package/utils/report-es-client.js +1 -1
- package/resource/doc/chatuikit/android/generate_UserSig.md +0 -306
- package/resource/doc/chatuikit/android/integrarte_only_tuichat_Android.md +0 -290
- package/resource/doc/chatuikit/android/quick_start_Android.md +0 -138
- package/resource/doc/chatuikit/android/show_typing_Android.md +0 -43
- package/resource/doc/chatuikit/flutter/generate_UserSig.md +0 -306
- package/resource/doc/chatuikit/flutter/integrate_tuikit_Flutter.md +0 -133
- package/resource/doc/chatuikit/iOS/generate_UserSig.md +0 -306
- package/resource/doc/chatuikit/iOS/integrate_only_tuichat_iOS.md +0 -748
- package/resource/doc/chatuikit/iOS/quick_start_iOS.md +0 -163
- package/resource/doc/chatuikit/iOS/show_typing_iOS.md +0 -52
- package/tools/definitions/get_native_live_extra_features_def.js.map +0 -1
- package/tools/definitions/get_native_live_interaction_def.js.map +0 -1
- package/tools/live/get_native_live_extra_features.js.map +0 -1
- package/tools/live/get_native_live_interaction.js.map +0 -1
- /package/resource/doc/chatuikit/android/{integrate_tuikit_Android.md → integration.md} +0 -0
- /package/resource/doc/chatuikit/{faq/native_sdk/faq.md → android/workflow.md} +0 -0
- /package/resource/doc/chatuikit/{flutter/client_api_Flutter.md → faq/flutter_sdk/client-api.md} +0 -0
- /package/resource/doc/chatuikit/iOS/{integrate_tuikit_iOS.md → integration.md} +0 -0
- /package/resource/doc/chatuikit/react/components/{chatheader.md → chat-header.md} +0 -0
- /package/resource/doc/chatuikit/vue/components/{chatheader.md → chat-header.md} +0 -0
|
@@ -1,748 +0,0 @@
|
|
|
1
|
-
This article will introduce how to integrate the `TUIChat` chat component.
|
|
2
|
-
|
|
3
|
-
> **Note:**
|
|
4
|
-
>
|
|
5
|
-
> - Starting from version 5.7.1435, TUIChat supports the classic version of UI components.
|
|
6
|
-
> - Starting from version 6.9.3557, TUIChat introduced a brand new minimalist version of UI components.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
You can freely choose between the classic or minimalist version of UI components according to your needs.
|
|
10
|
-
|
|
11
|
-
## Display Effect
|
|
12
|
-
|
|
13
|
-
TUIChat offers both private chat (1V1) and group chat (Group) features, supporting multiple operations on messages, such as sending different types of messages, long pressing a message to like/reply/quote, and querying message read receipt details.
|
|
14
|
-
|
|
15
|
-
You can integrate TUIChat into your app alone. The chat interface has a wide range of usage scenarios, such as real estate agency consultation, online medical consultation, e-commerce online customer service, and remote loss assessment for insurance.
|
|
16
|
-
The UI effect is as shown below:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
【Minimalist version】
|
|
21
|
-
<table>
|
|
22
|
-
<tr>
|
|
23
|
-
<td rowspan="1" colSpan="1" >Message UI \| Sending Different Types of Messages</td>
|
|
24
|
-
</tr>
|
|
25
|
-
|
|
26
|
-
<tr>
|
|
27
|
-
<td rowspan="1" colSpan="1" ><br></td>
|
|
28
|
-
</tr>
|
|
29
|
-
</table>
|
|
30
|
-
|
|
31
|
-
<table>
|
|
32
|
-
<tr>
|
|
33
|
-
<td rowspan="1" colSpan="1" >Message Reaction \| Reply </td>
|
|
34
|
-
</tr>
|
|
35
|
-
|
|
36
|
-
<tr>
|
|
37
|
-
<td rowspan="1" colSpan="1" ><br></td>
|
|
38
|
-
</tr>
|
|
39
|
-
</table>
|
|
40
|
-
|
|
41
|
-
<table>
|
|
42
|
-
<tr>
|
|
43
|
-
<td rowspan="1" colSpan="1" >Message Read Receipt \| Read Receipt Details</td>
|
|
44
|
-
</tr>
|
|
45
|
-
|
|
46
|
-
<tr>
|
|
47
|
-
<td rowspan="1" colSpan="1" ><br></td>
|
|
48
|
-
</tr>
|
|
49
|
-
</table>
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
【RTL Language】
|
|
53
|
-
<table>
|
|
54
|
-
<tr>
|
|
55
|
-
<td rowspan="1" colSpan="1" >Message Interface \| Sending Multiple Types of Messages</td>
|
|
56
|
-
</tr>
|
|
57
|
-
|
|
58
|
-
<tr>
|
|
59
|
-
<td rowspan="1" colSpan="1" ><br></td>
|
|
60
|
-
</tr>
|
|
61
|
-
</table>
|
|
62
|
-
|
|
63
|
-
<table>
|
|
64
|
-
<tr>
|
|
65
|
-
<td rowspan="1" colSpan="1" >Message Reaction \| Reply</td>
|
|
66
|
-
</tr>
|
|
67
|
-
|
|
68
|
-
<tr>
|
|
69
|
-
<td rowspan="1" colSpan="1" ><br></td>
|
|
70
|
-
</tr>
|
|
71
|
-
</table>
|
|
72
|
-
|
|
73
|
-
<table>
|
|
74
|
-
<tr>
|
|
75
|
-
<td rowspan="1" colSpan="1" >Message Read Receipt \| Read Receipt Details</td>
|
|
76
|
-
</tr>
|
|
77
|
-
|
|
78
|
-
<tr>
|
|
79
|
-
<td rowspan="1" colSpan="1" ><br></td>
|
|
80
|
-
</tr>
|
|
81
|
-
</table>
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
【Classic version】
|
|
85
|
-
<table>
|
|
86
|
-
<tr>
|
|
87
|
-
<td rowspan="1" colSpan="1" >Message UI</td>
|
|
88
|
-
|
|
89
|
-
<td rowspan="1" colSpan="1" >Sending Different Types of Messages</td>
|
|
90
|
-
</tr>
|
|
91
|
-
|
|
92
|
-
<tr>
|
|
93
|
-
<td rowspan="1" colSpan="1" ><br></td>
|
|
94
|
-
|
|
95
|
-
<td rowspan="1" colSpan="1" ><br></td>
|
|
96
|
-
</tr>
|
|
97
|
-
</table>
|
|
98
|
-
|
|
99
|
-
<table>
|
|
100
|
-
<tr>
|
|
101
|
-
<td rowspan="1" colSpan="1" >Message Likes/Reply/Quoting</td>
|
|
102
|
-
|
|
103
|
-
<td rowspan="1" colSpan="1" >Message Reply Details</td>
|
|
104
|
-
</tr>
|
|
105
|
-
|
|
106
|
-
<tr>
|
|
107
|
-
<td rowspan="1" colSpan="1" ><br></td>
|
|
108
|
-
|
|
109
|
-
<td rowspan="1" colSpan="1" ><br></td>
|
|
110
|
-
</tr>
|
|
111
|
-
</table>
|
|
112
|
-
|
|
113
|
-
<table>
|
|
114
|
-
<tr>
|
|
115
|
-
<td rowspan="1" colSpan="1" >Message Read Receipt</td>
|
|
116
|
-
|
|
117
|
-
<td rowspan="1" colSpan="1" >Message Read Receipt Details</td>
|
|
118
|
-
</tr>
|
|
119
|
-
|
|
120
|
-
<tr>
|
|
121
|
-
<td rowspan="1" colSpan="1" ><br></td>
|
|
122
|
-
|
|
123
|
-
<td rowspan="1" colSpan="1" ><br></td>
|
|
124
|
-
</tr>
|
|
125
|
-
</table>
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
## Environment Requirements
|
|
129
|
-
- Xcode 10 or later
|
|
130
|
-
|
|
131
|
-
- iOS 9.0 or later
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
## CocoaPods Integration
|
|
135
|
-
1. Install CocoaPods
|
|
136
|
-
Enter the following command in a terminal (you need to install Ruby on your Mac first):
|
|
137
|
-
|
|
138
|
-
``` bash
|
|
139
|
-
sudo gem install cocoapods
|
|
140
|
-
```
|
|
141
|
-
2. Create a Podfile
|
|
142
|
-
Go to the path where the project is located and run the following command. Then, a Podfile will appear under the project path.
|
|
143
|
-
|
|
144
|
-
``` bash
|
|
145
|
-
pod init
|
|
146
|
-
```
|
|
147
|
-
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:
|
|
148
|
-
|
|
149
|
-
- Remote CocoaPods Integration
|
|
150
|
-
|
|
151
|
-
- Local Integration of DevelopmentPods
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
The pros and cons of the above two integration methods are shown in the following table:
|
|
155
|
-
|
|
156
|
-
<table>
|
|
157
|
-
<tr>
|
|
158
|
-
<td rowspan="1" colSpan="1" >Integration methods</td>
|
|
159
|
-
|
|
160
|
-
<td rowspan="1" colSpan="1" >Suitable Scenarios</td>
|
|
161
|
-
|
|
162
|
-
<td rowspan="1" colSpan="1" >Advantage</td>
|
|
163
|
-
|
|
164
|
-
<td rowspan="1" colSpan="1" >Disadvantage</td>
|
|
165
|
-
</tr>
|
|
166
|
-
|
|
167
|
-
<tr>
|
|
168
|
-
<td rowspan="1" colSpan="1" >Remote CocoaPods Integration</td>
|
|
169
|
-
|
|
170
|
-
<td rowspan="1" colSpan="1" >Suitable for integration without source code modifications.</td>
|
|
171
|
-
|
|
172
|
-
<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>
|
|
173
|
-
|
|
174
|
-
<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>
|
|
175
|
-
</tr>
|
|
176
|
-
|
|
177
|
-
<tr>
|
|
178
|
-
<td rowspan="1" colSpan="1" >Local DevelopmentPods Integration</td>
|
|
179
|
-
|
|
180
|
-
<td rowspan="1" colSpan="1" >Suitable for customers who have custom modifications to the source code</td>
|
|
181
|
-
|
|
182
|
-
<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>
|
|
183
|
-
|
|
184
|
-
<td rowspan="1" colSpan="1" >You need to manually overwrite your local TUIKit folder with the TUIKit source code to update.</td>
|
|
185
|
-
</tr>
|
|
186
|
-
</table>
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
### Remote CocoaPods
|
|
190
|
-
|
|
191
|
-
You can add the TUIChat library in the Podfile:
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
【Minimalist version】
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
【Swift】
|
|
201
|
-
``` bash
|
|
202
|
-
# Uncomment the next line to define a global platform for your project.
|
|
203
|
-
source 'https://github.com/CocoaPods/Specs.git'
|
|
204
|
-
platform :ios, '13.0'
|
|
205
|
-
# Prevent `*.xcassets` in TUIChat components from conflicting with your project.
|
|
206
|
-
install! 'cocoapods', :disable_input_output_paths => true
|
|
207
|
-
|
|
208
|
-
# Replace `your_project_name` with your actual project name.
|
|
209
|
-
target 'your_project_name' do
|
|
210
|
-
use_frameworks!
|
|
211
|
-
use_modular_headers!
|
|
212
|
-
|
|
213
|
-
# Integrate the chat feature.
|
|
214
|
-
pod 'TUIChat_Swift/UI_Minimalist'
|
|
215
|
-
end
|
|
216
|
-
|
|
217
|
-
#Pods config
|
|
218
|
-
post_install do |installer|
|
|
219
|
-
installer.pods_project.targets.each do |target|
|
|
220
|
-
target.build_configurations.each do |config|
|
|
221
|
-
#Fix Xcode14 Bundle target error
|
|
222
|
-
config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""
|
|
223
|
-
config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
|
|
224
|
-
config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
|
|
225
|
-
config.build_settings['ENABLE_BITCODE'] = "NO"
|
|
226
|
-
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = "13.0"
|
|
227
|
-
#Fix Xcode15 other links flag -ld64
|
|
228
|
-
xcode_version = `xcrun xcodebuild -version | grep Xcode | cut -d' ' -f2`.to_f
|
|
229
|
-
if xcode_version >= 15
|
|
230
|
-
xcconfig_path = config.base_configuration_reference.real_path
|
|
231
|
-
xcconfig = File.read(xcconfig_path)
|
|
232
|
-
if xcconfig.include?("OTHER_LDFLAGS") == false
|
|
233
|
-
xcconfig = xcconfig + "\n" + 'OTHER_LDFLAGS = $(inherited) "-ld64"'
|
|
234
|
-
else
|
|
235
|
-
if xcconfig.include?("OTHER_LDFLAGS = $(inherited)") == false
|
|
236
|
-
xcconfig = xcconfig.sub("OTHER_LDFLAGS", "OTHER_LDFLAGS = $(inherited)")
|
|
237
|
-
end
|
|
238
|
-
if xcconfig.include?("-ld64") == false
|
|
239
|
-
xcconfig = xcconfig.sub("OTHER_LDFLAGS = $(inherited)", 'OTHER_LDFLAGS = $(inherited) "-ld64"')
|
|
240
|
-
end
|
|
241
|
-
end
|
|
242
|
-
File.open(xcconfig_path, "w") { |file| file << xcconfig }
|
|
243
|
-
end
|
|
244
|
-
end
|
|
245
|
-
end
|
|
246
|
-
end
|
|
247
|
-
```
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
【Objective-C】
|
|
251
|
-
``` bash
|
|
252
|
-
# Uncomment the next line to define a global platform for your project.
|
|
253
|
-
source 'https://github.com/CocoaPods/Specs.git'
|
|
254
|
-
platform :ios, '13.0'
|
|
255
|
-
# Prevent `*.xcassets` in TUIChat components from conflicting with your project.
|
|
256
|
-
install! 'cocoapods', :disable_input_output_paths => true
|
|
257
|
-
|
|
258
|
-
# Replace `your_project_name` with your actual project name.
|
|
259
|
-
target 'your_project_name' do
|
|
260
|
-
use_frameworks!
|
|
261
|
-
|
|
262
|
-
# Enable modular headers as needed. Only after you enable modular headers, the Pod module can be imported using @import.
|
|
263
|
-
# use_modular_headers!
|
|
264
|
-
|
|
265
|
-
# Integrate the chat feature.
|
|
266
|
-
pod 'TUIChat/UI_Minimalist'
|
|
267
|
-
end
|
|
268
|
-
|
|
269
|
-
#Pods config
|
|
270
|
-
post_install do |installer|
|
|
271
|
-
installer.pods_project.targets.each do |target|
|
|
272
|
-
target.build_configurations.each do |config|
|
|
273
|
-
#Fix Xcode14 Bundle target error
|
|
274
|
-
config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""
|
|
275
|
-
config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
|
|
276
|
-
config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
|
|
277
|
-
config.build_settings['ENABLE_BITCODE'] = "NO"
|
|
278
|
-
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = "13.0"
|
|
279
|
-
#Fix Xcode15 other links flag -ld64
|
|
280
|
-
xcode_version = `xcrun xcodebuild -version | grep Xcode | cut -d' ' -f2`.to_f
|
|
281
|
-
if xcode_version >= 15
|
|
282
|
-
xcconfig_path = config.base_configuration_reference.real_path
|
|
283
|
-
xcconfig = File.read(xcconfig_path)
|
|
284
|
-
if xcconfig.include?("OTHER_LDFLAGS") == false
|
|
285
|
-
xcconfig = xcconfig + "\n" + 'OTHER_LDFLAGS = $(inherited) "-ld64"'
|
|
286
|
-
else
|
|
287
|
-
if xcconfig.include?("OTHER_LDFLAGS = $(inherited)") == false
|
|
288
|
-
xcconfig = xcconfig.sub("OTHER_LDFLAGS", "OTHER_LDFLAGS = $(inherited)")
|
|
289
|
-
end
|
|
290
|
-
if xcconfig.include?("-ld64") == false
|
|
291
|
-
xcconfig = xcconfig.sub("OTHER_LDFLAGS = $(inherited)", 'OTHER_LDFLAGS = $(inherited) "-ld64"')
|
|
292
|
-
end
|
|
293
|
-
end
|
|
294
|
-
File.open(xcconfig_path, "w") { |file| file << xcconfig }
|
|
295
|
-
end
|
|
296
|
-
end
|
|
297
|
-
end
|
|
298
|
-
end
|
|
299
|
-
```
|
|
300
|
-
|
|
301
|
-
【Classic version】
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
【Swift】
|
|
307
|
-
``` bash
|
|
308
|
-
# Uncomment the next line to define a global platform for your project.
|
|
309
|
-
source 'https://github.com/CocoaPods/Specs.git'
|
|
310
|
-
# Prevent `*.xcassets` in TUIChat components from conflicting with your project.
|
|
311
|
-
install! 'cocoapods', :disable_input_output_paths => true
|
|
312
|
-
|
|
313
|
-
# Replace your_project_name with your actual project name.
|
|
314
|
-
target 'your_project_name' do
|
|
315
|
-
use_frameworks!
|
|
316
|
-
use_modular_headers!
|
|
317
|
-
|
|
318
|
-
# Integrate the chat feature.
|
|
319
|
-
pod 'TUIChat_Swift/UI_Classic'
|
|
320
|
-
end
|
|
321
|
-
|
|
322
|
-
#Pods config
|
|
323
|
-
post_install do |installer|
|
|
324
|
-
installer.pods_project.targets.each do |target|
|
|
325
|
-
target.build_configurations.each do |config|
|
|
326
|
-
#Fix Xcode14 Bundle target error
|
|
327
|
-
config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""
|
|
328
|
-
config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
|
|
329
|
-
config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
|
|
330
|
-
config.build_settings['ENABLE_BITCODE'] = "NO"
|
|
331
|
-
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = "13.0"
|
|
332
|
-
#Fix Xcode15 other links flag -ld64
|
|
333
|
-
xcode_version = `xcrun xcodebuild -version | grep Xcode | cut -d' ' -f2`.to_f
|
|
334
|
-
if xcode_version >= 15
|
|
335
|
-
xcconfig_path = config.base_configuration_reference.real_path
|
|
336
|
-
xcconfig = File.read(xcconfig_path)
|
|
337
|
-
if xcconfig.include?("OTHER_LDFLAGS") == false
|
|
338
|
-
xcconfig = xcconfig + "\n" + 'OTHER_LDFLAGS = $(inherited) "-ld64"'
|
|
339
|
-
else
|
|
340
|
-
if xcconfig.include?("OTHER_LDFLAGS = $(inherited)") == false
|
|
341
|
-
xcconfig = xcconfig.sub("OTHER_LDFLAGS", "OTHER_LDFLAGS = $(inherited)")
|
|
342
|
-
end
|
|
343
|
-
if xcconfig.include?("-ld64") == false
|
|
344
|
-
xcconfig = xcconfig.sub("OTHER_LDFLAGS = $(inherited)", 'OTHER_LDFLAGS = $(inherited) "-ld64"')
|
|
345
|
-
end
|
|
346
|
-
end
|
|
347
|
-
File.open(xcconfig_path, "w") { |file| file << xcconfig }
|
|
348
|
-
end
|
|
349
|
-
end
|
|
350
|
-
end
|
|
351
|
-
end
|
|
352
|
-
```
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
【Objective-C】
|
|
356
|
-
``` bash
|
|
357
|
-
# Uncomment the next line to define a global platform for your project.
|
|
358
|
-
source 'https://github.com/CocoaPods/Specs.git'
|
|
359
|
-
# Prevent `*.xcassets` in TUIChat components from conflicting with your project.
|
|
360
|
-
install! 'cocoapods', :disable_input_output_paths => true
|
|
361
|
-
|
|
362
|
-
# Replace your_project_name with your actual project name.
|
|
363
|
-
target 'your_project_name' do
|
|
364
|
-
use_frameworks!
|
|
365
|
-
|
|
366
|
-
# Enable modular headers as needed. Only after you enable modular headers, the Pod module can be imported using @import.
|
|
367
|
-
# use_modular_headers!
|
|
368
|
-
|
|
369
|
-
# Integrate the chat feature.
|
|
370
|
-
pod 'TUIChat/UI_Classic'
|
|
371
|
-
end
|
|
372
|
-
|
|
373
|
-
#Pods config
|
|
374
|
-
post_install do |installer|
|
|
375
|
-
installer.pods_project.targets.each do |target|
|
|
376
|
-
target.build_configurations.each do |config|
|
|
377
|
-
#Fix Xcode14 Bundle target error
|
|
378
|
-
config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""
|
|
379
|
-
config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
|
|
380
|
-
config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
|
|
381
|
-
config.build_settings['ENABLE_BITCODE'] = "NO"
|
|
382
|
-
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = "13.0"
|
|
383
|
-
#Fix Xcode15 other links flag -ld64
|
|
384
|
-
xcode_version = `xcrun xcodebuild -version | grep Xcode | cut -d' ' -f2`.to_f
|
|
385
|
-
if xcode_version >= 15
|
|
386
|
-
xcconfig_path = config.base_configuration_reference.real_path
|
|
387
|
-
xcconfig = File.read(xcconfig_path)
|
|
388
|
-
if xcconfig.include?("OTHER_LDFLAGS") == false
|
|
389
|
-
xcconfig = xcconfig + "\n" + 'OTHER_LDFLAGS = $(inherited) "-ld64"'
|
|
390
|
-
else
|
|
391
|
-
if xcconfig.include?("OTHER_LDFLAGS = $(inherited)") == false
|
|
392
|
-
xcconfig = xcconfig.sub("OTHER_LDFLAGS", "OTHER_LDFLAGS = $(inherited)")
|
|
393
|
-
end
|
|
394
|
-
if xcconfig.include?("-ld64") == false
|
|
395
|
-
xcconfig = xcconfig.sub("OTHER_LDFLAGS = $(inherited)", 'OTHER_LDFLAGS = $(inherited) "-ld64"')
|
|
396
|
-
end
|
|
397
|
-
end
|
|
398
|
-
File.open(xcconfig_path, "w") { |file| file << xcconfig }
|
|
399
|
-
end
|
|
400
|
-
end
|
|
401
|
-
end
|
|
402
|
-
end
|
|
403
|
-
```
|
|
404
|
-
|
|
405
|
-
> **Note:**
|
|
406
|
-
>
|
|
407
|
-
> - If you directly use `pod 'TUIChat'` without specifying classic or minimalist, it will integrate both UI component versions by default.
|
|
408
|
-
> - If you are using Swift, please enable `use_modular_headers!`, and change the header file reference to @import reference.
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
After modifying the Podfile, run the following command to install the TUIChat components.
|
|
412
|
-
``` bash
|
|
413
|
-
pod install
|
|
414
|
-
```
|
|
415
|
-
|
|
416
|
-
If you cannot install the latest version of TUIChat, run the following command to update the local CocoaPods repository list.
|
|
417
|
-
``` bash
|
|
418
|
-
pod repo update
|
|
419
|
-
```
|
|
420
|
-
|
|
421
|
-
Then run the following command to update the Pod version of the component library.
|
|
422
|
-
``` bash
|
|
423
|
-
pod update
|
|
424
|
-
```
|
|
425
|
-
|
|
426
|
-
After TUIChat components is integrated, the project structure is as follows:
|
|
427
|
-
|
|
428
|
-

|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
> **Note:**
|
|
432
|
-
>
|
|
433
|
-
|
|
434
|
-
> If you encounter any errors in the process, you can refer to the FAQs at the end of the document.
|
|
435
|
-
>
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
### Local DevelopmentPods
|
|
439
|
-
1. Download the TUIChat source code from GitHub. Drag it directly into your project directory, such as: `TestTUIKitIM/TUIKit/TUIChat`.
|
|
440
|
-
|
|
441
|
-
1. [Swift TUIChat in Github](https://github.com/Tencent-RTC/Chat_UIKit/tree/main/Swift/TUIKit)
|
|
442
|
-
|
|
443
|
-

|
|
444
|
-
|
|
445
|
-
2. [Objective-C TUIChat in Github](https://github.com/TencentCloud/TIMSDK/tree/master/iOS/TUIKit)
|
|
446
|
-
|
|
447
|
-

|
|
448
|
-
|
|
449
|
-
2. Modify the local path of each component in your Podfile. The path is the location of the TUIChat folder relative to your project's Podfile file. Common ones include:
|
|
450
|
-
|
|
451
|
-
- If the TUIChat folder is in the **parent directory** of your project's Podfile: `pod 'TUIChat', :path => "../TUIKit/TUIChat"`
|
|
452
|
-
|
|
453
|
-
- If the TUIChat folder is in the **current directory** of your project's Podfile: `pod 'TUIChat', :path => "/TUIKit/TUIChat"`
|
|
454
|
-
|
|
455
|
-
- If the TUIChat folder is in a **subdirectory** of your project's Podfile: `pod 'TUIChat', :path => "./TUIKit/TUIChat"`
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
Taking the TUIChat folder located in the parent directory of your project's Podfile as an example:
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
【Development Podfile】
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
【Swift】
|
|
469
|
-
``` bash
|
|
470
|
-
# Uncomment the next line to define a global platform for your project.
|
|
471
|
-
source 'https://github.com/CocoaPods/Specs.git'
|
|
472
|
-
platform :ios, '13.0'
|
|
473
|
-
install! 'cocoapods', :disable_input_output_paths => true
|
|
474
|
-
|
|
475
|
-
# Replace `your_project_name` with your actual project name.
|
|
476
|
-
target 'your_project_name' do
|
|
477
|
-
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks.
|
|
478
|
-
use_frameworks!
|
|
479
|
-
use_modular_headers!
|
|
480
|
-
|
|
481
|
-
# Note: When using the local integration solution, upgrade by downloading the latest component code from https://github.com/TencentCloud/TIMSDK/tree/master/iOS/TUIKit/TUIChat
|
|
482
|
-
# and placing it in the designated local directory, such as /TIMSDK/ios/TUIKit/TUIChat
|
|
483
|
-
# Note: When private modifications conflict with remote changes, manual merging is required to resolve conflicts.
|
|
484
|
-
|
|
485
|
-
# Integrate the basic library (required).
|
|
486
|
-
pod 'TUICore', :path => "../TUIKit/TUICore"
|
|
487
|
-
pod 'TIMCommon_Swift', :path => "../TUIKit/TIMCommon"
|
|
488
|
-
|
|
489
|
-
# Integrate the chat feature.
|
|
490
|
-
pod 'TUIChat_Swift', :path => "../TUIKit/TUIChat"
|
|
491
|
-
|
|
492
|
-
# Other Pod
|
|
493
|
-
pod 'MJRefresh'
|
|
494
|
-
pod 'SnapKit'
|
|
495
|
-
end
|
|
496
|
-
|
|
497
|
-
#Pods config
|
|
498
|
-
post_install do |installer|
|
|
499
|
-
installer.pods_project.targets.each do |target|
|
|
500
|
-
target.build_configurations.each do |config|
|
|
501
|
-
#Fix Xcode14 Bundle target error
|
|
502
|
-
config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""
|
|
503
|
-
config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
|
|
504
|
-
config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
|
|
505
|
-
config.build_settings['ENABLE_BITCODE'] = "NO"
|
|
506
|
-
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = "13.0"
|
|
507
|
-
#Fix Xcode15 other links flag -ld64
|
|
508
|
-
xcode_version = `xcrun xcodebuild -version | grep Xcode | cut -d' ' -f2`.to_f
|
|
509
|
-
if xcode_version >= 15
|
|
510
|
-
xcconfig_path = config.base_configuration_reference.real_path
|
|
511
|
-
xcconfig = File.read(xcconfig_path)
|
|
512
|
-
if xcconfig.include?("OTHER_LDFLAGS") == false
|
|
513
|
-
xcconfig = xcconfig + "\n" + 'OTHER_LDFLAGS = $(inherited) "-ld64"'
|
|
514
|
-
else
|
|
515
|
-
if xcconfig.include?("OTHER_LDFLAGS = $(inherited)") == false
|
|
516
|
-
xcconfig = xcconfig.sub("OTHER_LDFLAGS", "OTHER_LDFLAGS = $(inherited)")
|
|
517
|
-
end
|
|
518
|
-
if xcconfig.include?("-ld64") == false
|
|
519
|
-
xcconfig = xcconfig.sub("OTHER_LDFLAGS = $(inherited)", 'OTHER_LDFLAGS = $(inherited) "-ld64"')
|
|
520
|
-
end
|
|
521
|
-
end
|
|
522
|
-
File.open(xcconfig_path, "w") { |file| file << xcconfig }
|
|
523
|
-
end
|
|
524
|
-
end
|
|
525
|
-
end
|
|
526
|
-
end
|
|
527
|
-
```
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
【Objective-C】
|
|
531
|
-
``` bash
|
|
532
|
-
# Uncomment the next line to define a global platform for your project.
|
|
533
|
-
source 'https://github.com/CocoaPods/Specs.git'
|
|
534
|
-
platform :ios, '13.0'
|
|
535
|
-
install! 'cocoapods', :disable_input_output_paths => true
|
|
536
|
-
|
|
537
|
-
# Replace `your_project_name` with your actual project name.
|
|
538
|
-
target 'your_project_name' do
|
|
539
|
-
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks.
|
|
540
|
-
use_frameworks!
|
|
541
|
-
use_modular_headers!
|
|
542
|
-
|
|
543
|
-
# Note: When using the local integration solution, upgrade by downloading the latest component code from https://github.com/TencentCloud/TIMSDK/tree/master/iOS/TUIKit/TUIChat
|
|
544
|
-
# and placing it in the designated local directory, such as /TIMSDK/ios/TUIKit/TUIChat
|
|
545
|
-
# Note: When private modifications conflict with remote changes, manual merging is required to resolve conflicts.
|
|
546
|
-
|
|
547
|
-
# Integrate the basic library (required).
|
|
548
|
-
pod 'TUICore', :path => "../TUIKit/TUICore"
|
|
549
|
-
pod 'TIMCommon', :path => "../TUIKit/TIMCommon"
|
|
550
|
-
|
|
551
|
-
# Integrate the chat feature.
|
|
552
|
-
pod 'TUIChat', :path => "../TUIKit/TUIChat"
|
|
553
|
-
|
|
554
|
-
# Other Pod
|
|
555
|
-
pod 'MJRefresh'
|
|
556
|
-
pod 'Masonry'
|
|
557
|
-
end
|
|
558
|
-
|
|
559
|
-
#Pods config
|
|
560
|
-
post_install do |installer|
|
|
561
|
-
installer.pods_project.targets.each do |target|
|
|
562
|
-
target.build_configurations.each do |config|
|
|
563
|
-
#Fix Xcode14 Bundle target error
|
|
564
|
-
config.build_settings['EXPANDED_CODE_SIGN_IDENTITY'] = ""
|
|
565
|
-
config.build_settings['CODE_SIGNING_REQUIRED'] = "NO"
|
|
566
|
-
config.build_settings['CODE_SIGNING_ALLOWED'] = "NO"
|
|
567
|
-
config.build_settings['ENABLE_BITCODE'] = "NO"
|
|
568
|
-
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = "13.0"
|
|
569
|
-
#Fix Xcode15 other links flag -ld64
|
|
570
|
-
xcode_version = `xcrun xcodebuild -version | grep Xcode | cut -d' ' -f2`.to_f
|
|
571
|
-
if xcode_version >= 15
|
|
572
|
-
xcconfig_path = config.base_configuration_reference.real_path
|
|
573
|
-
xcconfig = File.read(xcconfig_path)
|
|
574
|
-
if xcconfig.include?("OTHER_LDFLAGS") == false
|
|
575
|
-
xcconfig = xcconfig + "\n" + 'OTHER_LDFLAGS = $(inherited) "-ld64"'
|
|
576
|
-
else
|
|
577
|
-
if xcconfig.include?("OTHER_LDFLAGS = $(inherited)") == false
|
|
578
|
-
xcconfig = xcconfig.sub("OTHER_LDFLAGS", "OTHER_LDFLAGS = $(inherited)")
|
|
579
|
-
end
|
|
580
|
-
if xcconfig.include?("-ld64") == false
|
|
581
|
-
xcconfig = xcconfig.sub("OTHER_LDFLAGS = $(inherited)", 'OTHER_LDFLAGS = $(inherited) "-ld64"')
|
|
582
|
-
end
|
|
583
|
-
end
|
|
584
|
-
File.open(xcconfig_path, "w") { |file| file << xcconfig }
|
|
585
|
-
end
|
|
586
|
-
end
|
|
587
|
-
end
|
|
588
|
-
end
|
|
589
|
-
```
|
|
590
|
-
|
|
591
|
-
3. After modifying the Podfile, run the following command to install the local TUIChat component. Example:
|
|
592
|
-
|
|
593
|
-
``` bash
|
|
594
|
-
pod install
|
|
595
|
-
```
|
|
596
|
-
|
|
597
|
-
> **Note:**
|
|
598
|
-
>
|
|
599
|
-
> - When using the local integration scheme, you can go to Github TUIChat for upgrades if needed.
|
|
600
|
-
> - Get the latest component code and overwrite the local directory, such as: TIMSDK/iOS/TUIKit/TUIChat.
|
|
601
|
-
> - When private modifications conflict with the remote version, manual merging is required to resolve conflicts.
|
|
602
|
-
> - The TUIChat plugin requires a specific version of TUICore. Make sure the plugin version matches the spec.version in "../TUIKit/TUICore/TUICore.spec".
|
|
603
|
-
> - If you encounter any errors in the process, you can refer to the FAQs at the end of the document.
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
## Build Chat Interface
|
|
607
|
-
|
|
608
|
-
After integrating TUIChat, if you want to continue building the chat interface, please refer to the document: [Build Chat Interface](https://write.woa.com/document/147637893719252992).
|
|
609
|
-
|
|
610
|
-
## FAQs
|
|
611
|
-
|
|
612
|
-
### Xcode15 Issues
|
|
613
|
-
- **Integration error: [Xcodeproj] Unknown object version (60). (RuntimeError)**
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-

|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
When creating a new project in Xcode15 to integrate TUIChat and entering `pod install`, you may encounter this problem due to using an older version of CocoaPods. There are two solutions:
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
Solution 1: Change the Xcode project's `Project Format` version to Xcode13.0.
|
|
623
|
-
|
|
624
|
-

|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
Solution 2: Upgrade your local version of CocoaPods. The upgrade method will not be elaborated here.
|
|
628
|
-
|
|
629
|
-
- **Assertion failed: (false && "compact unwind compressed function offset doesn't fit in 24 bits"), function operator(), file Layout.cpp.**
|
|
630
|
-
|
|
631
|
-

|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
Or, when integrating TUIRoom with XCode15, the latest linker causes symbol conflicts in TUIRoomEngine, which is also part of this issue.
|
|
635
|
-
|
|
636
|
-

|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
Solution: Modify the linker configuration. In `Build Settings`, add `-ld64` to `Other Linker Flags`.
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
Official Documentation: [https://developer.apple.com/forums/thread/735426](https://links.jianshu.com/go?to=https%3A%2F%2Fdeveloper.apple.com%2Fforums%2Fthread%2F735426)
|
|
643
|
-
|
|
644
|
-

|
|
645
|
-
|
|
646
|
-
- **Rosetta Simulator Issue**
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
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.
|
|
650
|
-
|
|
651
|
-

|
|
652
|
-
|
|
653
|
-
- **Xcode 15 Developer Sandbox Option Error: Sandbox: bash(xxx) deny(1) file-write-create**
|
|
654
|
-
|
|
655
|
-

|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
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.
|
|
659
|
-
|
|
660
|
-

|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
### CocoaPods Issues
|
|
664
|
-
- **When using remote integration, issues with mismatched Pod dependency versions**
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
If you encounter a mismatch between the Podfile.lock and the plugin dependency version of TUICore while using remote CocoaPods integration,
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
please delete the Podfile.lock file and use `pod repo update`to update your local repository, then use `pod update` to refresh the updates.
|
|
671
|
-
|
|
672
|
-

|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
- **When using local integration, issues with mismatched Pod dependency versions**
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
When integrating local DevelopmentPods and the plugin dependency on TUICoreis newer, but the local Pod dependency version is 1.0.0,
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
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.
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
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.
|
|
686
|
-
|
|
687
|
-

|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
### Submission Issues
|
|
691
|
-
- **Packaging failure when launching on the Appstore, with an 'Unsupported Architectures' error message.**
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
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.
|
|
695
|
-
|
|
696
|
-

|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
You can follow the steps below to remove the simulator version during packaging:
|
|
700
|
-
|
|
701
|
-
1. Select your project's Target and click on the `Build Phases` option, then add a `Run Script` to the current panel;
|
|
702
|
-
|
|
703
|
-

|
|
704
|
-
|
|
705
|
-
2. In the newly added Run Script, insert the following script:
|
|
706
|
-
|
|
707
|
-
``` bash
|
|
708
|
-
#!/bin/sh
|
|
709
|
-
|
|
710
|
-
# Strip invalid architectures
|
|
711
|
-
strip_invalid_archs() {
|
|
712
|
-
binary="$1"
|
|
713
|
-
echo "current binary ${binary}"
|
|
714
|
-
# Get architectures for current file
|
|
715
|
-
archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)"
|
|
716
|
-
stripped=""
|
|
717
|
-
for arch in $archs; do
|
|
718
|
-
if ! [[ "${ARCHS}" == *"$arch"* ]]; then
|
|
719
|
-
if [ -f "$binary" ]; then
|
|
720
|
-
# Strip non-valid architectures in-place
|
|
721
|
-
lipo -remove "$arch" -output "$binary" "$binary" || exit 1
|
|
722
|
-
stripped="$stripped $arch"
|
|
723
|
-
fi
|
|
724
|
-
fi
|
|
725
|
-
done
|
|
726
|
-
if [[ "$stripped" ]]; then
|
|
727
|
-
echo "Stripped $binary of architectures:$stripped"
|
|
728
|
-
fi
|
|
729
|
-
}
|
|
730
|
-
|
|
731
|
-
APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}"
|
|
732
|
-
|
|
733
|
-
# This script loops through the frameworks embedded in the application and
|
|
734
|
-
# removes unused architectures.
|
|
735
|
-
find "$APP_PATH" -name '*.framework' -type d | while read -r FRAMEWORK
|
|
736
|
-
do
|
|
737
|
-
FRAMEWORK_EXECUTABLE_NAME=$(defaults read "$FRAMEWORK/Info.plist" CFBundleExecutable)
|
|
738
|
-
FRAMEWORK_EXECUTABLE_PATH="$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME"
|
|
739
|
-
echo "Executable is $FRAMEWORK_EXECUTABLE_PATH"
|
|
740
|
-
strip_invalid_archs "$FRAMEWORK_EXECUTABLE_PATH"
|
|
741
|
-
done
|
|
742
|
-
```
|
|
743
|
-

|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
## Contact Us
|
|
747
|
-
|
|
748
|
-
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.
|