@tencentcloud/sdk-mcp 1.7.7 → 1.7.9-beta.1
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/CHANGELOG.md +13 -0
- package/README.md +7 -9
- package/index.js +8 -8
- package/knowledge/chunker.js +1 -0
- package/knowledge/doc-url-resolver.js +16 -9
- package/knowledge/embedding/build-vectors.js +92 -0
- package/knowledge/embedding/embed-model.js +41 -0
- package/knowledge/embedding/vector-augment.js +126 -0
- package/knowledge/embedding/vector-index.js +70 -0
- package/knowledge/frontmatter-meta.js +23 -0
- package/knowledge/path-meta.js +56 -0
- package/knowledge/search/exact-lookup.js +145 -16
- package/knowledge/search/filter-pool.js +77 -33
- package/knowledge/search/rank-profile.js +25 -0
- package/knowledge/search/requires-framework.js +4 -1
- package/knowledge/search/search-core.js +74 -13
- package/knowledge/search/search-knowledge.js +24 -34
- package/knowledge/search/search-pass.js +495 -169
- package/knowledge/search/url-row-scorer.js +24 -6
- package/package.json +3 -1
- package/resource/index/manifest.json +1 -1
- package/resource/index/vectors/index.json +4 -0
- package/resource/integration/callkit/preset/android/integration.md +0 -2
- package/resource/integration/callkit/preset/ios/integration.md +0 -2
- package/resource/integration/chat/preset/react/integration.md +9 -5
- package/resource/integration/chat/preset/uni-app/integration.md +4 -0
- package/resource/integration/chat/preset/vue/integration.md +10 -6
- package/resource/integration/livekit/preset/live/android/prepare-integration.md +0 -4
- package/resource/integration/livekit/preset/live/ios/prepare-integration.md +0 -4
- package/resource/integration/roomkit/preset/vue/integration.md +154 -208
- package/resource/knowledge/callkit/best-practice/android/video-chat-dating.md +0 -2
- package/resource/knowledge/callkit/core-sdk/android/answer-call.md +0 -2
- package/resource/knowledge/callkit/core-sdk/android/make-call.md +0 -2
- package/resource/knowledge/callkit/core-sdk/flutter/answer-call.md +0 -4
- package/resource/knowledge/callkit/core-sdk/flutter/make-call.md +0 -2
- package/resource/knowledge/callkit/core-sdk/flutter/offline-push.md +0 -2
- package/resource/knowledge/callkit/core-sdk/ios/answer-call.md +0 -2
- package/resource/knowledge/callkit/core-sdk/ios/make-call.md +0 -4
- package/resource/knowledge/callkit/core-sdk/ios/offline-push.md +0 -2
- package/resource/knowledge/callkit/core-sdk/uni-app/answer-call.md +0 -2
- package/resource/knowledge/callkit/core-sdk/uni-app/make-call.md +0 -2
- package/resource/knowledge/callkit/faq/ios.md +0 -2
- package/resource/knowledge/callkit/faq/uniapp-app.md +0 -2
- package/resource/knowledge/callkit/preset/miniprogram/integration.md +2 -3
- package/resource/knowledge/callkit/preset/miniprogram/uniapp-integration.md +0 -2
- package/resource/knowledge/chat/preset/ios-uikit/integration.md +0 -16
- package/resource/knowledge/chat/preset/react/h5/integration.md +16 -5
- package/resource/knowledge/chat/preset/vue/features/conversation-list.md +6 -3
- package/resource/knowledge/chat/preset/vue/h5/integration.md +7 -4
- package/resource/knowledge/iot/app/activate-service.md +95 -0
- package/resource/knowledge/iot/app/demo/android.md +93 -0
- package/resource/knowledge/iot/app/demo/ios.md +87 -0
- package/resource/knowledge/iot/app/demo/miniprogram.md +79 -0
- package/resource/knowledge/iot/app/device-binding.md +378 -0
- package/resource/knowledge/iot/app/device-sharing.md +414 -0
- package/resource/knowledge/iot/app/family-management.md +762 -0
- package/resource/knowledge/iot/app/integration/android.md +328 -0
- package/resource/knowledge/iot/app/integration/harmonyos.md +326 -0
- package/resource/knowledge/iot/app/integration/ios.md +351 -0
- package/resource/knowledge/iot/app/integration/miniprogram.md +268 -0
- package/resource/knowledge/iot/app/monitor-playback.md +557 -0
- package/resource/knowledge/iot/app/remote-control.md +139 -0
- package/resource/knowledge/iot/app/video-call.md +559 -0
- package/resource/knowledge/iot/app/wechat-call/device-call-miniprogram.md +204 -0
- package/resource/knowledge/iot/app/wechat-call/miniprogram-call-device.md +193 -0
- package/resource/knowledge/iot/client-api/app/android/txiotcallsession.md +189 -0
- package/resource/knowledge/iot/client-api/app/android/txiotcloudstorage.md +77 -0
- package/resource/knowledge/iot/client-api/app/android/txiotdevicemanager.md +175 -0
- package/resource/knowledge/iot/client-api/app/android/txiotengine.md +172 -0
- package/resource/knowledge/iot/client-api/app/android/txiotenginedef.md +163 -0
- package/resource/knowledge/iot/client-api/app/android/txiotfamilymanager.md +146 -0
- package/resource/knowledge/iot/client-api/app/android/txiotmonitorsession.md +246 -0
- package/resource/knowledge/iot/client-api/app/harmonyos/txiotcallsession.md +191 -0
- package/resource/knowledge/iot/client-api/app/harmonyos/txiotcloudstorage.md +77 -0
- package/resource/knowledge/iot/client-api/app/harmonyos/txiotdevicemanager.md +183 -0
- package/resource/knowledge/iot/client-api/app/harmonyos/txiotengine.md +186 -0
- package/resource/knowledge/iot/client-api/app/harmonyos/txiotenginedef.md +164 -0
- package/resource/knowledge/iot/client-api/app/harmonyos/txiotfamilymanager.md +150 -0
- package/resource/knowledge/iot/client-api/app/harmonyos/txiotmonitorsession.md +252 -0
- package/resource/knowledge/iot/client-api/app/ios/txiotcallsession.md +199 -0
- package/resource/knowledge/iot/client-api/app/ios/txiotcloudstorage.md +76 -0
- package/resource/knowledge/iot/client-api/app/ios/txiotdevicemanager.md +173 -0
- package/resource/knowledge/iot/client-api/app/ios/txiotengine.md +173 -0
- package/resource/knowledge/iot/client-api/app/ios/txiotenginedef.md +171 -0
- package/resource/knowledge/iot/client-api/app/ios/txiotfamilymanager.md +146 -0
- package/resource/knowledge/iot/client-api/app/ios/txiotmonitorsession.md +250 -0
- package/resource/knowledge/iot/client-api/app/miniprogram/txiotcallsession.md +180 -0
- package/resource/knowledge/iot/client-api/app/miniprogram/txiotcloudstorage.md +76 -0
- package/resource/knowledge/iot/client-api/app/miniprogram/txiotdevicemanager.md +281 -0
- package/resource/knowledge/iot/client-api/app/miniprogram/txiotengine.md +183 -0
- package/resource/knowledge/iot/client-api/app/miniprogram/txiotenginedef.md +152 -0
- package/resource/knowledge/iot/client-api/app/miniprogram/txiotfamilymanager.md +179 -0
- package/resource/knowledge/iot/client-api/app/miniprogram/txiotmonitorsession.md +226 -0
- package/resource/knowledge/iot/client-api/device/android-smart-device.md +813 -0
- package/resource/knowledge/iot/client-api/device/linux-rtos-device.md +2027 -0
- package/resource/knowledge/iot/device/activate-service.md +167 -0
- package/resource/knowledge/iot/device/ai-voice-chat/advanced-features/custom-agent.md +171 -0
- package/resource/knowledge/iot/device/ai-voice-chat/advanced-features/smart-device-control.md +721 -0
- package/resource/knowledge/iot/device/ai-voice-chat/integration-guide/android-smart-device.md +247 -0
- package/resource/knowledge/iot/device/ai-voice-chat/integration-guide/linux-rtos-device.md +368 -0
- package/resource/knowledge/iot/device/ai-voice-chat/overview.md +84 -0
- package/resource/knowledge/iot/device/cloud-storage.md +696 -0
- package/resource/knowledge/iot/device/data-model.md +972 -0
- package/resource/knowledge/iot/device/demo/android-smart-device.md +97 -0
- package/resource/knowledge/iot/device/demo/linux-rtos-device.md +106 -0
- package/resource/knowledge/iot/device/device-ota-upgrade.md +237 -0
- package/resource/knowledge/iot/device/dynamic-registration/android-smart-device.md +275 -0
- package/resource/knowledge/iot/device/dynamic-registration/linux-rtos-device.md +297 -0
- package/resource/knowledge/iot/device/login-and-register/android-smart-device.md +131 -0
- package/resource/knowledge/iot/device/login-and-register/linux-rtos-device.md +291 -0
- package/resource/knowledge/iot/device/monitor-pushing/android-smart-device.md +237 -0
- package/resource/knowledge/iot/device/monitor-pushing/linux-rtos-device.md +493 -0
- package/resource/knowledge/iot/device/video-call/android-smart-device.md +299 -0
- package/resource/knowledge/iot/device/video-call/linux-rtos-device.md +465 -0
- package/resource/knowledge/iot/device/wechat-call/android-smart-device.md +534 -0
- package/resource/knowledge/iot/device/wechat-call/linux-rtos-device.md +681 -0
- package/resource/knowledge/iot/kids-watch/overview.md +28 -0
- package/resource/knowledge/iot/security-camera/activate-service.md +74 -0
- package/resource/knowledge/iot/security-camera/monitor-playback/app-integration.md +302 -0
- package/resource/knowledge/iot/security-camera/monitor-playback/device-integration/android.md +237 -0
- package/resource/knowledge/iot/security-camera/monitor-playback/device-integration/linux-rtos.md +493 -0
- package/resource/knowledge/iot/security-camera/overview.md +31 -0
- package/resource/knowledge/iot/security-camera/ptz-control.md +153 -0
- package/resource/knowledge/iot/security-camera/recording-and-snapshot.md +182 -0
- package/resource/knowledge/iot/security-camera/voice-intercom.md +174 -0
- package/resource/knowledge/iot/smart-vision/serviceoverview.md +114 -0
- package/resource/knowledge/iot/voice-recorder/app-demo.md +99 -0
- package/resource/knowledge/iot/voice-recorder/device-demo.md +189 -0
- package/resource/knowledge/iot/voice-recorder/overview.md +64 -0
- package/resource/knowledge/livekit/core-sdk/features/android/base-beauty.md +0 -2
- package/resource/knowledge/livekit/core-sdk/features/android/gift.md +0 -4
- package/resource/knowledge/livekit/core-sdk/features/android/live-list.md +0 -2
- package/resource/knowledge/livekit/core-sdk/features/flutter/audio-effect.md +0 -2
- package/resource/knowledge/livekit/core-sdk/features/flutter/base-beauty.md +0 -2
- package/resource/knowledge/livekit/core-sdk/features/flutter/gift.md +0 -4
- package/resource/knowledge/livekit/core-sdk/features/ios/base-beauty.md +0 -2
- package/resource/knowledge/livekit/core-sdk/features/ios/gift.md +0 -4
- package/resource/knowledge/livekit/core-sdk/features/ios/live-list.md +0 -2
- package/resource/knowledge/livekit/core-sdk/features/uni-app/base-beauty.md +0 -2
- package/resource/knowledge/livekit/core-sdk/features/uni-app/gift.md +0 -4
- package/resource/knowledge/livekit/core-sdk/live/android/co-guest-interaction.md +0 -4
- package/resource/knowledge/livekit/core-sdk/live/android/host-interaction.md +0 -10
- package/resource/knowledge/livekit/core-sdk/live/android/integration.md +0 -2
- package/resource/knowledge/livekit/core-sdk/live/flutter/co-guest-interaction.md +0 -2
- package/resource/knowledge/livekit/core-sdk/live/flutter/host-interaction.md +0 -10
- package/resource/knowledge/livekit/core-sdk/live/flutter/integration.md +0 -2
- package/resource/knowledge/livekit/core-sdk/live/ios/co-guest-interaction.md +0 -4
- package/resource/knowledge/livekit/core-sdk/live/ios/host-interaction.md +0 -10
- package/resource/knowledge/livekit/core-sdk/live/ios/integration.md +0 -2
- package/resource/knowledge/livekit/core-sdk/live/uni-app/co-guest-interaction.md +0 -4
- package/resource/knowledge/livekit/core-sdk/live/uni-app/host-interaction.md +0 -4
- package/resource/knowledge/livekit/core-sdk/live/uni-app/integration.md +0 -2
- package/resource/knowledge/livekit/core-sdk/voice/android/co-guest-interaction.md +0 -2
- package/resource/knowledge/livekit/core-sdk/voice/android/host-interaction.md +0 -4
- package/resource/knowledge/livekit/core-sdk/voice/android/integration.md +0 -4
- package/resource/knowledge/livekit/core-sdk/voice/flutter/integration.md +0 -2
- package/resource/knowledge/livekit/core-sdk/voice/ios/co-guest-interaction.md +0 -2
- package/resource/knowledge/livekit/core-sdk/voice/ios/host-interaction.md +0 -4
- package/resource/knowledge/livekit/core-sdk/voice/ios/integration.md +0 -4
- package/resource/knowledge/livekit/core-sdk/voice/uni-app/co-guest-interaction.md +0 -2
- package/resource/knowledge/livekit/core-sdk/voice/uni-app/integration.md +0 -2
- package/resource/knowledge/livekit/faq/error-code.md +0 -2
- package/resource/knowledge/push/config/android/honor.md +16 -1
- package/resource/knowledge/push/config/android/huawei.md +20 -4
- package/resource/knowledge/push/config/android/meizu.md +19 -5
- package/resource/knowledge/push/config/android/vivo.md +20 -1
- package/resource/knowledge/push/config/donut.md +0 -2
- package/resource/knowledge/push/config/harmonyos.md +21 -5
- package/resource/knowledge/push/integration/android.md +0 -5
- package/resource/knowledge/push/integration/donut.md +0 -3
- package/resource/knowledge/push/integration/flutter.md +1 -4
- package/resource/knowledge/push/integration/harmonyos.md +0 -3
- package/resource/knowledge/push/integration/ios.md +0 -3
- package/resource/knowledge/push/integration/react-native.md +0 -5
- package/resource/knowledge/push/integration/uni-app.md +0 -3
- package/resource/knowledge/push/integration/unity.md +0 -3
- package/resource/knowledge/push/integration/unreal-engine.md +0 -3
- package/resource/knowledge/roomkit/core-sdk/android/call-user-to-room.md +0 -2
- package/resource/knowledge/roomkit/core-sdk/android/room-participant-state.md +0 -2
- package/resource/knowledge/roomkit/core-sdk/android/room-state.md +0 -2
- package/resource/knowledge/roomkit/core-sdk/android/schedule-room.md +0 -2
- package/resource/knowledge/roomkit/core-sdk/flutter/call-user-to-room.md +0 -2
- package/resource/knowledge/roomkit/core-sdk/flutter/room-participant-state.md +0 -2
- package/resource/knowledge/roomkit/core-sdk/flutter/room-state.md +0 -2
- package/resource/knowledge/roomkit/core-sdk/flutter/schedule-room.md +0 -2
- package/resource/knowledge/roomkit/core-sdk/ios/call-user-to-room.md +0 -2
- package/resource/knowledge/roomkit/core-sdk/ios/room-participant-state.md +0 -2
- package/resource/knowledge/roomkit/core-sdk/ios/room-state.md +0 -2
- package/resource/knowledge/roomkit/core-sdk/ios/schedule-room.md +0 -2
- package/resource/knowledge/roomkit/core-sdk/vue/room-view.md +0 -3
- package/resource/knowledge/roomkit/preset/uniapp-app/integration.md +18 -14
- package/resource/knowledge/rtcengine/web/how_to_run_web_sdk_demo.md +0 -2
- package/resource/knowledge/rtcengine/web/plugin/23-advanced-support-detection.md +30 -0
- package/resource/knowledge/rtcengine/web/plugin/24-advanced-network-quality.md +0 -2
- package/resource/knowledge/rtcengine/web/plugin/31-advanced-plugins-overview.md +1 -1
- package/resource/knowledge/rtcengine/web/plugin/35-advanced-ai-denoiser.md +1 -1
- package/resource/knowledge/rtcengine/web/plugin/36-advanced-virtual-background.md +4 -0
- package/resource/knowledge/trtc/android/TRTCCloud.md +94 -85
- package/resource/knowledge/trtc/android/TRTCCloudDef.md +48 -46
- package/resource/knowledge/trtc/android/TRTCCloudListener.md +48 -48
- package/resource/knowledge/trtc/android/TXAudioEffectManager.md +18 -18
- package/resource/knowledge/trtc/android/TXDeviceManager.md +4 -4
- package/resource/knowledge/trtc/android/TXLiteAVCode.md +1 -0
- package/resource/knowledge/trtc/c++/ITRTCCloud.md +90 -90
- package/resource/knowledge/trtc/c++/ITXAudioEffectManager.md +18 -18
- package/resource/knowledge/trtc/c++/ITXDeviceManager.md +9 -9
- package/resource/knowledge/trtc/c++/TRTCCloudCallback.md +47 -47
- package/resource/knowledge/trtc/c++/TRTCTypeDef.md +47 -45
- package/resource/knowledge/trtc/c++/TXLiteAVCode.md +1 -0
- package/resource/knowledge/trtc/ios/TRTCCloud.md +93 -93
- package/resource/knowledge/trtc/ios/TRTCCloudDelegate.md +50 -50
- package/resource/knowledge/trtc/ios/TXAudioEffectManager.md +8 -8
- package/resource/knowledge/trtc/ios/TXDeviceManager.md +9 -9
- package/resource/knowledge/trtc/ios/TXLiteAVCode.md +1 -0
- package/resource/knowledge/trtc/ios/TXLiveSDKTypeDef.md +48 -46
- package/server-config.js +8 -9
- package/server.js +1 -1
- package/tools/common/finalize_answer.js +1 -1
- package/tools/common/present_framework_choice.js +1 -1
- package/tools/common/search_trtc_knowledge.js +22 -3
- package/tools/definitions/search_trtc_knowledge_def.js +3 -2
- package/utils/preflight-route.js +19 -2
- package/utils/report-cls-client.js +1 -1
- package/utils/report-es-client.js +1 -1
|
@@ -11,8 +11,6 @@
|
|
|
11
11
|
|
|
12
12
|
## 准备工作
|
|
13
13
|
|
|
14
|
-
### 步骤1:开通服务
|
|
15
|
-
|
|
16
14
|
### 步骤2:集成 SDK
|
|
17
15
|
|
|
18
16
|
**安装组件**:在工程的根目录下,通过命令行执行以下命令安装 [atomic_x_core](https://pub.dev/packages/atomic_x_core) 插件。
|
|
@@ -450,8 +448,6 @@ void addListener(BuildContext context) {
|
|
|
450
448
|
|
|
451
449
|
当您完成以上 6 步后,"接听一通电话"运行效果如下:
|
|
452
450
|
|
|
453
|
-
## 接入离线推送
|
|
454
|
-
|
|
455
451
|
## 定制页面
|
|
456
452
|
|
|
457
453
|
**CallCoreView** 提供了完善的 UI 定制能力,支持头像及音量提示等图标的自由替换。**为助力快速集成,您可以直接从** [**Github**](https://github.com/Tencent-RTC/TUIKit_Flutter/tree/main/atomic-x/call_assets) **下载。这些图标由我们的设计师专为 TUICallKit 打造,无版权风险,可放心使用。**
|
|
@@ -12,8 +12,6 @@
|
|
|
12
12
|
|
|
13
13
|
## 准备工作
|
|
14
14
|
|
|
15
|
-
### 步骤1:开通服务
|
|
16
|
-
|
|
17
15
|
### 步骤2:集成 SDK
|
|
18
16
|
1. **添加 Pod 依赖:**在您项目的 `Podfile` 文件中添加 `pod 'AtomicXCore'` 依赖。
|
|
19
17
|
|
|
@@ -1263,8 +1261,6 @@ private func observeSelfCallStatus() {
|
|
|
1263
1261
|
}
|
|
1264
1262
|
```
|
|
1265
1263
|
|
|
1266
|
-
### 设置离线推送参数
|
|
1267
|
-
|
|
1268
1264
|
## 下一步
|
|
1269
1265
|
|
|
1270
1266
|
恭喜您,已经完成了"拨打一通电话",接下来,您可参考 接听第一通电话 实现接听电话功能。
|
|
@@ -98,8 +98,6 @@ end
|
|
|
98
98
|
|
|
99
99
|
**支持**,调用 [setCallingBell](https://cloud.tencent.com/document/product/647/78753#setCallingBell) 即可。
|
|
100
100
|
|
|
101
|
-
### TUICallKit 是否支持后台运行?
|
|
102
|
-
|
|
103
101
|
### 如何查看 TRTC 日志?
|
|
104
102
|
|
|
105
103
|
TRTC 的日志默认压缩加密,后缀为 .xlog。日志是否加密是可以通过 setLogCompressEnabled 来控制,生成的文件名里面含 C(compressed) 的就是加密压缩的,含 R(raw) 的就是明文的。
|
|
@@ -19,8 +19,6 @@
|
|
|
19
19
|
|
|
20
20
|
## 小程序开发准备
|
|
21
21
|
|
|
22
|
-
### 步骤1:开通企业类小程序
|
|
23
|
-
|
|
24
22
|
### 步骤2:在小程序控制台开启实时音视频接口
|
|
25
23
|
- 小程序推拉流标签使用权限暂时只开放给有限类目,[具体支持类目参见该地址](https://developers.weixin.qq.com/miniprogram/dev/component/live-pusher.html#%E7%94%B3%E8%AF%B7%E5%BC%80%E9%80%9A)。
|
|
26
24
|
|
|
@@ -143,7 +141,8 @@ xcopy node_modules\@trtc\calls-uikit-wx\ .\TUICallKit /i /e
|
|
|
143
141
|
"navigationBarTextStyle": "black",
|
|
144
142
|
"navigationStyle": "custom"
|
|
145
143
|
},
|
|
146
|
-
"style": "v2"
|
|
144
|
+
"style": "v2",
|
|
145
|
+
"renderer": "webview"
|
|
147
146
|
}
|
|
148
147
|
```
|
|
149
148
|
2. 修改 `pages/index` 文件夹下的文件。
|
|
@@ -19,8 +19,6 @@
|
|
|
19
19
|
|
|
20
20
|
在使用腾讯云提供的音视频服务前,您需要前往控制台,为应用开通音视频服务。具体步骤详见 [开通服务](https://cloud.tencent.com/document/product/647/104662)。开通服务后,请记录 `SDKAppID、SecretKey`,在后续的步骤中会用到。
|
|
21
21
|
|
|
22
|
-
### 开通企业类小程序
|
|
23
|
-
|
|
24
22
|
### 在小程序控制台开启实时音视频接口
|
|
25
23
|
- 小程序推拉流标签使用权限暂时只开放给有限类目,[具体支持类目参见该地址](https://developers.weixin.qq.com/miniprogram/dev/component/live-pusher.html#%E7%94%B3%E8%AF%B7%E5%BC%80%E9%80%9A)。
|
|
26
24
|
|
|
@@ -297,22 +297,6 @@ func showChat(_ info: ConversationInfo) {
|
|
|
297
297
|
|
|
298
298
|
- 如果是群聊通话邀请,被邀请者离线再上线后会自动拉取最近 30 秒内的邀请,TUIKit 会自动唤起群通话界面。
|
|
299
299
|
|
|
300
|
-
#### 如何移除音视频通话功能?
|
|
301
|
-
|
|
302
|
-
ChatPage 默认集成了音视频通话功能,如果你不需要音视频通话功能。可以在 步骤 3 创建聊天界面 中关闭音视频通话开关,代码如下所示:
|
|
303
|
-
|
|
304
|
-
【Swift】
|
|
305
|
-
``` swift
|
|
306
|
-
func showChat(_ info: ConversationInfo) {
|
|
307
|
-
// 在输入配置中关闭输入面板中的视频通话和音频通话功能
|
|
308
|
-
let inputConfig = ChatMessageInputConfig(isShowVideoCall: false, isShowAudioCall: false)
|
|
309
|
-
let chatPage = ChatPage(conversation: info, messageInputConfig: inputConfig, onBack: { [weak self] in
|
|
310
|
-
self?.navigationController.popViewController(animated: true)
|
|
311
|
-
})
|
|
312
|
-
navigationController.pushViewController(chatPage, animated: true)
|
|
313
|
-
}
|
|
314
|
-
```
|
|
315
|
-
|
|
316
300
|
### 上架常见问题
|
|
317
301
|
|
|
318
302
|
#### 上架 App Store 时打包失败,提示 Unsupported Architectures?
|
|
@@ -78,7 +78,7 @@ npm create vite@latest
|
|
|
78
78
|
|
|
79
79
|
【shell】
|
|
80
80
|
``` bash
|
|
81
|
-
npm install @tencentcloud/chat-uikit-react @tencentcloud/uikit-base-component-react
|
|
81
|
+
npm install @tencentcloud/chat-uikit-react @tencentcloud/uikit-base-component-react @trtc/calls-uikit-react
|
|
82
82
|
```
|
|
83
83
|
|
|
84
84
|
### 步骤2:引入组件
|
|
@@ -163,6 +163,7 @@ npm install @tencentcloud/chat-uikit-react @tencentcloud/uikit-base-component-re
|
|
|
163
163
|
``` typescript
|
|
164
164
|
import { useState } from 'react';
|
|
165
165
|
import { LoginStatus, UIKitProvider, useLoginState } from '@tencentcloud/chat-uikit-react';
|
|
166
|
+
import { TUICallKit } from '@trtc/calls-uikit-react';
|
|
166
167
|
import { LoginView } from './LoginView';
|
|
167
168
|
import { ChatLayout } from './ChatLayout';
|
|
168
169
|
import { languageResources } from './i18n';
|
|
@@ -177,9 +178,14 @@ npm install @tencentcloud/chat-uikit-react @tencentcloud/uikit-base-component-re
|
|
|
177
178
|
const [language, setLanguage] = useState('zh-CN');
|
|
178
179
|
|
|
179
180
|
return (
|
|
180
|
-
<UIKitProvider language={language} languageResources={languageResources}>
|
|
181
|
+
<UIKitProvider theme="light" language={language} languageResources={languageResources}>
|
|
181
182
|
{isLogined
|
|
182
|
-
?
|
|
183
|
+
? (
|
|
184
|
+
<>
|
|
185
|
+
<ChatLayout onChangeLanguage={setLanguage} />
|
|
186
|
+
<TUICallKit className="call-kit" />
|
|
187
|
+
</>
|
|
188
|
+
)
|
|
183
189
|
: <LoginView language={language} onChangeLanguage={setLanguage} />}
|
|
184
190
|
</UIKitProvider>
|
|
185
191
|
);
|
|
@@ -833,10 +839,10 @@ npm run dev
|
|
|
833
839
|
### 音视频通话
|
|
834
840
|
|
|
835
841
|
> **说明:**
|
|
836
|
-
> TUICallKit 是腾讯云推出的一款音视频通话 UI 组件,通过集成该组件,您只需要编写几行代码就可以在聊天应用中体验音视频通话功能。
|
|
837
|
-
>
|
|
842
|
+
> - TUICallKit 是腾讯云推出的一款音视频通话 UI 组件,通过集成该组件,您只需要编写几行代码就可以在聊天应用中体验音视频通话功能。
|
|
838
843
|
> 更多详细信息可参考:音视频通话-开通服务。
|
|
839
844
|
>
|
|
845
|
+
> - 在上面的过程中已经集成了 TUICallKit,若不需要音视频通话功能,可参考以下过程移除集成代码。
|
|
840
846
|
|
|
841
847
|
1. 安装 `@trtc/calls-uikit-react` 依赖
|
|
842
848
|
|
|
@@ -882,6 +888,11 @@ npm run dev
|
|
|
882
888
|
|
|
883
889
|
export default App;
|
|
884
890
|
```
|
|
891
|
+
3. 如果不需要集成音视频通话,可以通过移除 `<TUICallKit />`、修改 MessageInputH5 组件的 `actions` 属性,来移除音视频通话的能力。
|
|
892
|
+
|
|
893
|
+
``` typescript
|
|
894
|
+
<MessageInputH5 actions={['EmojiPicker', 'ImagePicker', 'VideoPicker', 'FilePicker']} />
|
|
895
|
+
```
|
|
885
896
|
|
|
886
897
|
### 云端搜索
|
|
887
898
|
|
|
@@ -274,8 +274,11 @@ const handleFilterClick = (filterType: FilterType) => {
|
|
|
274
274
|
|PlaceholderLoadError|Component|<PlaceHolder type={PlaceHolderTypes.WRONG} />|自定义会话列表加载错误时的占位元素。|
|
|
275
275
|
|filter|(conversationList: ConversationInfo[]) => ConversationInfo[]|-|用于筛选会话列表的函数。|
|
|
276
276
|
|sort|(conversationList: ConversationModel[]) => ConversationModel[]|-|用于排序会话列表的函数。|
|
|
277
|
-
|onConversationSelect|(conversation: ConversationInfo) => void;|-|点击会话后的回调函数,参数为所点击的会话对象。|
|
|
278
|
-
|onBeforeCreateConversation|(params: CreateParams) => CreateParams;|-|创建会话前执行的自定义操作,参数为创建会话所需的参数。|
|
|
279
|
-
|onConversationCreate|(conversation: ConversationInfo) => void;|-|会话创建后的回调函数,参数为创建的会话对象。|
|
|
280
277
|
|className|String|-|指定根元素类的 CSS 自定义名称。|
|
|
281
278
|
|style|CSSProperties|-|指定根元素样式的自定义样式。|
|
|
279
|
+
|
|
280
|
+
## Emits
|
|
281
|
+
| conversation-select | (conversation: ConversationInfo) => void; | - | 点击会话后的回调函数,参数为所点击的会话对象。 |
|
|
282
|
+
| --- | --- | --- | --- |
|
|
283
|
+
| before-create-conversation | (params: CreateParams) => CreateParams; | - | 创建会话前执行的自定义操作,参数为创建会话所需的参数。 |
|
|
284
|
+
| conversation-created | (conversation: ConversationInfo) => void; | - | 会话创建后的回调函数,参数为创建的会话对象。 |
|
|
@@ -80,7 +80,7 @@ npm create vite@latest
|
|
|
80
80
|
|
|
81
81
|
【shell】
|
|
82
82
|
``` bash
|
|
83
|
-
npm install @tencentcloud/chat-uikit-vue3 @tencentcloud/uikit-base-component-vue3
|
|
83
|
+
npm install @tencentcloud/chat-uikit-vue3 @tencentcloud/uikit-base-component-vue3 @trtc/calls-uikit-vue
|
|
84
84
|
```
|
|
85
85
|
|
|
86
86
|
### 步骤2:引入组件
|
|
@@ -163,6 +163,7 @@ npm install @tencentcloud/chat-uikit-vue3 @tencentcloud/uikit-base-component-vue
|
|
|
163
163
|
<script setup lang="ts">
|
|
164
164
|
import { ref, watch } from 'vue';
|
|
165
165
|
import { UIKitProvider, useLoginState } from '@tencentcloud/chat-uikit-vue3';
|
|
166
|
+
import { TUICallKit } from '@trtc/calls-uikit-vue';
|
|
166
167
|
import LoginView from './LoginView.vue';
|
|
167
168
|
import ChatLayout from './ChatLayout.vue';
|
|
168
169
|
import { languageResources } from './i18n';
|
|
@@ -184,8 +185,10 @@ npm install @tencentcloud/chat-uikit-vue3 @tencentcloud/uikit-base-component-vue
|
|
|
184
185
|
<UIKitProvider theme="light" :language="language" :language-resources="languageResources">
|
|
185
186
|
<LoginView v-if="loginStatus !== LoginStatus.LOGINED" />
|
|
186
187
|
<ChatLayout v-else />
|
|
188
|
+
<TUICallKit class="call-kit" />
|
|
187
189
|
</UIKitProvider>
|
|
188
190
|
</template>
|
|
191
|
+
|
|
189
192
|
```
|
|
190
193
|
4. 配置登录页和聊天页面。
|
|
191
194
|
|
|
@@ -580,10 +583,10 @@ npm run dev
|
|
|
580
583
|
### 音视频通话
|
|
581
584
|
|
|
582
585
|
> **说明:**
|
|
583
|
-
> TUICallKit 是腾讯云推出的一款音视频通话 UI 组件,通过集成该组件,您只需要编写几行代码就可以在聊天应用中体验音视频通话功能。
|
|
584
|
-
>
|
|
586
|
+
> - TUICallKit 是腾讯云推出的一款音视频通话 UI 组件,通过集成该组件,您只需要编写几行代码就可以在聊天应用中体验音视频通话功能。
|
|
585
587
|
> 更多详细信息可参考:音视频通话-开通服务。
|
|
586
588
|
>
|
|
589
|
+
> - 在上面的过程中已经集成了 TUICallKit,若不需要音视频通话功能,可参考以下过程移除集成代码。
|
|
587
590
|
|
|
588
591
|
1. 安装 @trtc/calls-uikit-vue 依赖。
|
|
589
592
|
|
|
@@ -631,7 +634,7 @@ npm run dev
|
|
|
631
634
|
</template>
|
|
632
635
|
|
|
633
636
|
```
|
|
634
|
-
3.
|
|
637
|
+
3. 如果不需要集成音视频通话,可以通过移除 `<TUICallKit />`、修改 MessageInputH5 组件的 `actions` 属性,来移除音视频通话的能力。
|
|
635
638
|
|
|
636
639
|
``` typescript
|
|
637
640
|
<MessageInputH5 class="chat-pane__input" :actions="['EmojiPicker', 'ImagePicker', 'VideoPicker', 'FilePicker']" />
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
product: iot
|
|
3
|
+
framework:
|
|
4
|
+
- '*'
|
|
5
|
+
types:
|
|
6
|
+
- feature
|
|
7
|
+
retrievable_scope: always
|
|
8
|
+
feature_domain: app
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
本文将介绍使用 IoT 通用功能(应用端)所需开通的服务。
|
|
12
|
+
|
|
13
|
+
## 开通设备接入服务
|
|
14
|
+
|
|
15
|
+
### 购买设备激活码
|
|
16
|
+
1. 在购买基础设备接入服务之前,您需要先 [注册腾讯云](https://cloud.tencent.com/document/product/378/17985) 账号,并完成 [实名认证](https://cloud.tencent.com/document/product/378/3629)。
|
|
17
|
+
|
|
18
|
+
2. 进入 [物联网开发平台购买页](https://buy.cloud.tencent.com/iotexplorer),实例类型选择**消费实例**。
|
|
19
|
+
|
|
20
|
+
3. 服务类型:若您的智能设备涉及音视频功能,请选择“**音视频设备接入服务**”;否则,请选择“**基础设备接入服务**”。
|
|
21
|
+
|
|
22
|
+
4. 生效地域:国内设备选择广州区域,出海设备选择新加坡;有效期默认规格5年。
|
|
23
|
+
|
|
24
|
+
5. 激活码数量:输入您要量产的设备数量,一个物理设备默认烧录一个激活码。
|
|
25
|
+
|
|
26
|
+
6. 勾选我已阅读并同意《腾讯云服务协议》,单击**立即购买**。
|
|
27
|
+
|
|
28
|
+
7. 单击立即购买后进入订单确认,确认后单击**去支付**进行付款,支付成功后系统将您支付订单的激活码数量累加到对应激活码规格的总可用数量。
|
|
29
|
+
|
|
30
|
+
### 查看激活码用量
|
|
31
|
+
|
|
32
|
+
支付完基础设备接入服务后,用户可进入 [物联网开发平台控制台](https://console.cloud.tencent.com/iotexplorer) 的**消费实例**,选择左侧导航栏的**用量统计** > **激活码概览**可查看支付成功的订单对应的激活码用量。
|
|
33
|
+
|
|
34
|
+
## 创建产品
|
|
35
|
+
1. 登录 [物联网开发平台控制台](https://console.cloud.tencent.com/iotexplorer),进入**实例管理**页面,单击**消费实例**的卡片进入详情页。
|
|
36
|
+
|
|
37
|
+
2. 选择消费实例左侧导航栏的**产品**,然后单击**创建产品**。
|
|
38
|
+
|
|
39
|
+
3. 在创建产品页面中,输入“产品名称”,如果您的产品有使用到音视频相关的能力,请您选择设备类型为“**音视频设备**”,否则选择设备类型为“**基础设备**”。信息配置好后,单击**创建**。
|
|
40
|
+
|
|
41
|
+
## 创建设备
|
|
42
|
+
1. 选择消费实例左侧导航栏的**设备**,然后单击**新建设备**。
|
|
43
|
+
|
|
44
|
+
2. 所属产品选择前述步骤已创建成功的产品,输入设备名称并单击**新建**。
|
|
45
|
+
|
|
46
|
+
3. 单击创建成功的设备,进入设备详情页获取设备三元组信息。
|
|
47
|
+
|
|
48
|
+
> **说明:**
|
|
49
|
+
>
|
|
50
|
+
> 产品 ID、设备名称、设备密钥三元组信息作为快速接入的设备身份凭证。
|
|
51
|
+
>
|
|
52
|
+
|
|
53
|
+
## 创建应用
|
|
54
|
+
1. 选择消费实例左侧导航栏的**应用**,单击**新建应用**。
|
|
55
|
+
|
|
56
|
+
2. 输入应用名称,单击**保存**创建应用。
|
|
57
|
+
|
|
58
|
+
3. 单击创建的应用,可获取应用的 App Key 及 App Secret。
|
|
59
|
+
|
|
60
|
+
> **注意:**
|
|
61
|
+
>
|
|
62
|
+
> App Key 与 App Secret 会在后续 App SDK 开发时使用,可直接使用 Android 应用的 App Key 与 App Secret。
|
|
63
|
+
>
|
|
64
|
+
|
|
65
|
+
## 应用关联产品
|
|
66
|
+
|
|
67
|
+
> **注意:**
|
|
68
|
+
> 若应用未关联产品,APP 在绑定产品下的设备时会提示“APP 对操作该产品无权限”。
|
|
69
|
+
>
|
|
70
|
+
|
|
71
|
+
## 激活服务
|
|
72
|
+
1. 为音视频设备激活微信通话服务(TWeCall),请使用 [激活 TWeCall](https://cloud.tencent.com/document/product/1081/106587) 云 API
|
|
73
|
+
|
|
74
|
+
激活 Voip 的参数 SN 设置为 productID_deviceName. 注意使用英文下划线。
|
|
75
|
+
|
|
76
|
+
2. 查询音视频设备的微信通话服务(TWeCall)剩余可用时长,请使用 [查询 TWeCall 激活状态](https://cloud.tencent.com/document/product/1081/106583) 云 API。
|
|
77
|
+
|
|
78
|
+
## 小程序授权
|
|
79
|
+
|
|
80
|
+
小程序需与物联网开发平台的应用进行关联,才能为音视频设备激活微信通话(TWeCall)的激活码。
|
|
81
|
+
1. 创建应用完成后,单击应用名称进入应用详情。在应用详情页面的**腾讯云微通话**中,单击**去授权**。
|
|
82
|
+
|
|
83
|
+
2. 在小程序授权弹窗内,单击**开始授权**,系统将自动生成授权二维码。
|
|
84
|
+
|
|
85
|
+
3. 请小程序的管理员扫码完成授权。
|
|
86
|
+
|
|
87
|
+
## 小程序申请硬件能力
|
|
88
|
+
|
|
89
|
+
如果要使用设备呼叫微信的能力 (TWeCall),需要在小程序后台配置硬件。
|
|
90
|
+
|
|
91
|
+
在 [小程序管理后台](https://mp.weixin.qq.com/wxamp/deviceList),找到**行业能力** > **硬件设备**页面,单击**添加设备**, 申请小程序的硬件能力。
|
|
92
|
+
|
|
93
|
+
按照页面提示,填写对应的信息。审核通过后,小程序具备音视频能力,可以和设备调试 VoIP 功能。
|
|
94
|
+
|
|
95
|
+
设备和小程序调试完成后,按照微信要求,寄送设备至微信,完成认证,小程序音视频能力才可以线上运行。
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
product: iot
|
|
3
|
+
framework:
|
|
4
|
+
- android
|
|
5
|
+
types:
|
|
6
|
+
- feature
|
|
7
|
+
retrievable_scope: always
|
|
8
|
+
feature_domain: app_demo
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
本文将为您介绍如何快速跑通 Android Demo。跟随本文档,您可以快速跑通 Demo,并最终体验一个包含完备 UI 界面的物联网 App。
|
|
12
|
+
|
|
13
|
+
## 前提条件
|
|
14
|
+
|
|
15
|
+
### 环境准备
|
|
16
|
+
- 安装 [Android Studio](https://developer.android.com/studio) 2025 以后的版本。
|
|
17
|
+
|
|
18
|
+
- 一台 Android 10 以上的设备。
|
|
19
|
+
|
|
20
|
+
### 开通服务
|
|
21
|
+
- 。
|
|
22
|
+
|
|
23
|
+
- 并参见 开通服务,创建设备获取设备的 ProductId、DeviceName,在后续绑定设备步骤中会用到。
|
|
24
|
+
|
|
25
|
+
## 下载 Demo 隐私与安全性
|
|
26
|
+
1. 从 GitHub 下载 [IoT App Demo](https://github.com/Tencent-RTC/Tencent_IoT_App) 源码,或者直接在命令行运行以下命令:
|
|
27
|
+
|
|
28
|
+
``` bash
|
|
29
|
+
git clone https://github.com/Tencent-RTC/Tencent_IoT_App.git
|
|
30
|
+
```
|
|
31
|
+
2. 通过 Android Studio 打开 `Tencent_IoT_App/android` 目录:
|
|
32
|
+
|
|
33
|
+
> **提示:**
|
|
34
|
+
>
|
|
35
|
+
> **Android Studio 的推荐方案:**将 Android Studio 的 Java 版本改为17。
|
|
36
|
+
>
|
|
37
|
+
> 1. 打开 Android Studio 设置。
|
|
38
|
+
> - **Windows**:File > Settings
|
|
39
|
+
> - **Mac**:Android Studio > Preferences
|
|
40
|
+
> 2. 修改 Java 编译器设置。
|
|
41
|
+
> - 路径:Build, Execution, Deployment > Build Tools > Gradle
|
|
42
|
+
> - 将 Gradle JDK 改为17(如果已安装)或 Use project JDK
|
|
43
|
+
|
|
44
|
+
## 跑通 Demo
|
|
45
|
+
|
|
46
|
+
按照 开通服务,创建设备和应用,并通过 Android Studio 运行 App,将设备绑定到 App。
|
|
47
|
+
|
|
48
|
+
### **步骤1:运行** **Demo**
|
|
49
|
+
1. 开启手机开发者选项与 USB 调试(设置 > 关于手机 > 连续单击版本号7次),连接后允许调试授权。
|
|
50
|
+
|
|
51
|
+
2. 等待 Gradle 首次同步完成再运行。
|
|
52
|
+
|
|
53
|
+
3. 选择设备并编译和运行 Demo。
|
|
54
|
+
|
|
55
|
+
> **说明:**
|
|
56
|
+
>
|
|
57
|
+
> 本 Demo 默认集成了音视频通话功能,由于该功能依赖的音视频 SDK 暂不支持模拟器,因此建议使用真机调试、运行 Demo。
|
|
58
|
+
>
|
|
59
|
+
|
|
60
|
+
### **步骤2:登录和注册**
|
|
61
|
+
|
|
62
|
+
Demo 启动后,在 UserId 输入框中输入自定义 ID,并在 AppKey、AppSecret 输入框中输入从 开通服务 获取的对应信息。
|
|
63
|
+
|
|
64
|
+
> **提示:**
|
|
65
|
+
> 建议您尽量避免将您的 UserId 设置成 “1”、“123”、“111” 等简单字符串,在多人协作开发时,此类 UserId 容易被同事占用导致登录失败,建议在调试时设置辨识度高的 UserId。
|
|
66
|
+
>
|
|
67
|
+
|
|
68
|
+
### 步骤3:绑定设备
|
|
69
|
+
|
|
70
|
+
绑定设备时需要设备绑定签名(DeviceSignature),通过 API Explorer 在线调试获取。
|
|
71
|
+
1. 打开 [GenSingleDeviceSignatureOfPublic 接口](https://console.cloud.tencent.com/api/explorer),填入从 [开通服务](https://cloud.tencent.com/document/product/1081/135242) 文档获取的 ProductId、DeviceName(Expire 为签名过期时间,按需填写即可,例如设置为当前时间 24 小时后),单击**发送请求**,从返回结果的 Response.DeviceSignature 中获取签名值。
|
|
72
|
+
|
|
73
|
+
2. 将获取到的签名值,填写到 “添加设备” 页面的签名输入框,然后单击**添加设备**。
|
|
74
|
+
|
|
75
|
+
### 步骤4:通过物模型操作设备属性
|
|
76
|
+
|
|
77
|
+
在 `DeviceHardwareType.kt` 添加您的产品 ID,Demo 会将该列表中的产品类型当做 “智能吸顶灯”,其他的产品当做安防摄像头。
|
|
78
|
+
``` java
|
|
79
|
+
object DeviceHardwareRegistry {
|
|
80
|
+
// Demo 会将该列表中的产品类型当做 “智能吸顶灯”,其他的产品当做安防摄像头
|
|
81
|
+
private val ceilingLampProductIds = setOf(
|
|
82
|
+
"XXXXXXXXXX"
|
|
83
|
+
)
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
> **注意:**
|
|
88
|
+
> 若未将 ProductId 加入列表,设备将被识别为安防摄像头。设备详情页与预期不符时,请检查该配置。
|
|
89
|
+
>
|
|
90
|
+
|
|
91
|
+
在绑定设备后,设备列表中就能看到对应智能吸顶灯设备,单击进去,就能看到智能吸顶灯的操作界面。
|
|
92
|
+
|
|
93
|
+
接下来还需要参考 设备端的跑通 Demo 文档将设备端的 Demo 跑通,就可以通过 App Demo 操作智能吸顶灯了。
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
product: iot
|
|
3
|
+
framework:
|
|
4
|
+
- ios
|
|
5
|
+
types:
|
|
6
|
+
- feature
|
|
7
|
+
retrievable_scope: always
|
|
8
|
+
feature_domain: app_demo
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
本文将为您介绍如何快速跑通 iOS Demo。跟随本文档,您可以快速跑通 Demo,并最终体验一个包含完备 UI 界面的物联网 App。
|
|
12
|
+
|
|
13
|
+
## 前提条件
|
|
14
|
+
|
|
15
|
+
### 环境准备
|
|
16
|
+
|
|
17
|
+
在开始之前,请确保您已满足下列要求:
|
|
18
|
+
- Xcode 16.0 及以上版本。
|
|
19
|
+
|
|
20
|
+
- 一部 iOS 15.6 及以上真机。
|
|
21
|
+
|
|
22
|
+
- 确保您已注册 Apple 开发者账号。
|
|
23
|
+
|
|
24
|
+
### 开通服务
|
|
25
|
+
1. 。
|
|
26
|
+
|
|
27
|
+
2. 并参见 开通服务,创建设备获取设备的 ProductId、DeviceName,在后续绑定设备步骤中会用到。
|
|
28
|
+
|
|
29
|
+
## 下载 Demo
|
|
30
|
+
|
|
31
|
+
从 GitHub 下载 [IoT App Demo](https://github.com/Tencent-RTC/Tencent_IoT_App) 源码,或者直接在命令行运行以下命令:
|
|
32
|
+
``` bash
|
|
33
|
+
git clone https://github.com/Tencent-RTC/Tencent_IoT_App.git
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## 跑通 Demo
|
|
37
|
+
|
|
38
|
+
按照 开通服务,创建设备和应用,然后通过 Xcode 打开 `Tencent_IoT_App/ios/TXIoTDemo.xcodeproj` 项目:
|
|
39
|
+
|
|
40
|
+
### **步骤1:运行** **Demo**
|
|
41
|
+
1. 将 iOS 设备连接至电脑,在设备上选择**设置** > **隐私与安全性** > **开发者模式**,打开开发者模式。
|
|
42
|
+
|
|
43
|
+
2. 在 Xcode 界面顶部的 iOS Device 选项中选择您用来测试的 iOS 设备。
|
|
44
|
+
|
|
45
|
+
3. 在项目 TARGETS 的 **Signing & Capabilities** 界面勾选 **Automatically manage signing**,然后在每一个 Target 下配置您的苹果开发者账号和 Bundle Identifier。如果尚未在 Xcode 中登录 Apple ID,请先在 **Xcode > Settings > Apple Accounts** 中添加您的开发者账号或 Apple ID。
|
|
46
|
+
|
|
47
|
+
4. 单击运行开始编译。编译成功后,您的设备上会自动安装好腾讯云 TXIoTDemo App。
|
|
48
|
+
|
|
49
|
+
> **说明:**
|
|
50
|
+
>
|
|
51
|
+
> 本 Demo 默认集成了音视频通话功能,由于该功能依赖的音视频 SDK 暂不支持模拟器,因此建议使用真机调试、运行 Demo。
|
|
52
|
+
>
|
|
53
|
+
|
|
54
|
+
### **步骤2:登录和注册**
|
|
55
|
+
|
|
56
|
+
Demo 启动后,在 UserId 输入框中输入自定义 ID,并在 AppKey、AppSecret 输入框中输入从 开通服务 获取的对应信息。
|
|
57
|
+
|
|
58
|
+
> **提示:**
|
|
59
|
+
> 建议您尽量避免将您的 UserId 设置成 “1”、“123”、“111” 等简单字符串,在多人协作开发时,此类 UserId 容易被同事占用导致登录失败,建议在调试时设置辨识度高的 UserId。
|
|
60
|
+
>
|
|
61
|
+
|
|
62
|
+
### 步骤3:绑定设备
|
|
63
|
+
|
|
64
|
+
绑定设备时需要设备绑定签名(DeviceSignature),通过 API Explorer 在线调试获取。
|
|
65
|
+
1. 打开 [GenSingleDeviceSignatureOfPublic 接口](https://console.cloud.tencent.com/api/explorer),填入从 [开通服务](https://cloud.tencent.com/document/product/1081/135242) 文档获取的 ProductId、DeviceName(Expire 为签名过期时间,按需填写即可,例如设置为当前时间 24 小时后),单击**发起请求**,从返回结果的 Response.DeviceSignature 中获取签名值。
|
|
66
|
+
|
|
67
|
+
2. 将获取到的签名值,填写到 “添加设备” 页面的签名输入框,然后单击**添加设备**。
|
|
68
|
+
|
|
69
|
+
### 步骤4:通过物模型操作设备属性
|
|
70
|
+
|
|
71
|
+
在 `DeviceHardwareType.swift` 添加您的产品 ID,Demo 会将该列表中的产品类型当做 “智能吸顶灯”,其他的产品当做安防摄像头。
|
|
72
|
+
``` swift
|
|
73
|
+
enum DeviceHardwareRegistry {
|
|
74
|
+
// Demo 会将该列表中的产品类型当做 “智能吸顶灯”,其他的产品当做安防摄像头
|
|
75
|
+
private static let ceilingLampProductIds: Set<String> = [
|
|
76
|
+
"XXXXXXXXXX"
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
> **注意:**
|
|
82
|
+
> 若未将 ProductId 加入列表,设备将被识别为安防摄像头。设备详情页与预期不符时,请检查该配置。
|
|
83
|
+
>
|
|
84
|
+
|
|
85
|
+
在绑定设备后,设备列表中就能看到对应智能吸顶灯设备,单击进去,就能看到智能吸顶灯的操作界面。
|
|
86
|
+
|
|
87
|
+
接下来还需要参考 设备端的跑通 Demo 文档将设备端的 Demo 跑通,就可以通过 App Demo 操作智能吸顶灯了。
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
product: iot
|
|
3
|
+
framework:
|
|
4
|
+
- minprogram
|
|
5
|
+
types:
|
|
6
|
+
- feature
|
|
7
|
+
retrievable_scope: always
|
|
8
|
+
feature_domain: app_demo
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
本文将为您介绍如何快速跑通小程序 Demo。跟随本文档,您可以快速跑通 Demo,并最终体验一个包含完备 UI 界面的物联网 App。
|
|
12
|
+
|
|
13
|
+
## 前提条件
|
|
14
|
+
|
|
15
|
+
### 环境准备
|
|
16
|
+
|
|
17
|
+
在开始之前,请确保您已满足下列要求:
|
|
18
|
+
- 安装微信开发者工具。
|
|
19
|
+
|
|
20
|
+
- 一部 iPhone 或安卓真机,安装并登录微信。模拟器不支持原生组件(即 <live-pusher> 和 <live-player> 标签),需要在真机上进行运行体验。
|
|
21
|
+
|
|
22
|
+
- 申请小程序 AppID. 并且申请 live-pusher, live-player 和双人音视频对话权限。
|
|
23
|
+
|
|
24
|
+
### 开通服务
|
|
25
|
+
- 。
|
|
26
|
+
|
|
27
|
+
- 并参见 开通服务,创建设备获取设备的 ProductId、DeviceName,在后续绑定设备步骤中会用到。
|
|
28
|
+
|
|
29
|
+
## 下载 Demo
|
|
30
|
+
1. 从 GitHub 下载 [IoT App Demo](https://github.com/Tencent-RTC/Tencent_IoT_App) 源码,或者直接在命令行运行以下命令:
|
|
31
|
+
|
|
32
|
+
``` bash
|
|
33
|
+
git clone https://github.com/Tencent-RTC/Tencent_IoT_App.git
|
|
34
|
+
```
|
|
35
|
+
2. 通过微信开发者工具打开 `Tencent_IoT_App/miniprogram` 目录
|
|
36
|
+
|
|
37
|
+
## 跑通 Demo
|
|
38
|
+
|
|
39
|
+
按照 开通服务,创建设备和应用,通过微信开发者工具运行 App, 将设备绑定到 App。
|
|
40
|
+
|
|
41
|
+
### **步骤1:运行** **Demo**
|
|
42
|
+
|
|
43
|
+
修改 project.config.json 中的 appid, 改为自己申请的小程序 AppID。
|
|
44
|
+
|
|
45
|
+
> **说明:**
|
|
46
|
+
> 模拟器不支持原生组件(即 <live-pusher> 和 <live-player> 标签),需要在真机上进行运行体验。
|
|
47
|
+
>
|
|
48
|
+
|
|
49
|
+
### **步骤2:登录和注册**
|
|
50
|
+
|
|
51
|
+
Demo 启动后,在 UserId 输入框中输入自定义 ID,并在 AppKey、AppSecret 输入框中输入从 开通服务 获取的对应信息。
|
|
52
|
+
|
|
53
|
+
> **提示:**
|
|
54
|
+
> 建议您尽量避免将您的 UserId 设置成 “1”、“123”、“111” 等简单字符串,在多人协作开发时,此类 UserId 容易被同事占用导致登录失败,建议在调试时设置辨识度高的 UserId。
|
|
55
|
+
>
|
|
56
|
+
|
|
57
|
+
### 步骤3:绑定设备
|
|
58
|
+
|
|
59
|
+
绑定设备时需要设备绑定签名(DeviceSignature),通过 API Explorer 在线调试获取。
|
|
60
|
+
|
|
61
|
+
打开 [GenSingleDeviceSignatureOfPublic 接口](https://console.cloud.tencent.com/api/explorer),填入从 [开通服务](https://cloud.tencent.com/document/product/1081/135242) 文档获取的 ProductId、DeviceName(Expire 为签名过期时间,按需填写即可,例如设置为当前时间 24 小时后),单击**发送请求**,从返回结果的 Response.DeviceSignature 中获取签名值。
|
|
62
|
+
|
|
63
|
+
将获取到的签名值,填写到 “添加设备” 页面的签名输入框,然后单击**添加设备**。
|
|
64
|
+
|
|
65
|
+
### 步骤4:通过物模型操作设备属性
|
|
66
|
+
|
|
67
|
+
在 `device.ts` 文件中添加您的产品 ID,Demo 会将该列表中的产品类型当做 “智能吸顶灯”,其他的产品当做安防摄像头。
|
|
68
|
+
``` typescript
|
|
69
|
+
// Demo 会将该列表中的产品类型当做 “智能吸顶灯”,其他的产品当做安防摄像头
|
|
70
|
+
const CEILING_LAMP_PRODUCT_IDS = ['XXXXXXXXXX'];
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
> **注意:**
|
|
74
|
+
> 若未将 ProductId 加入列表,设备将被识别为安防摄像头。设备详情页与预期不符时,请检查该配置。
|
|
75
|
+
>
|
|
76
|
+
|
|
77
|
+
在绑定设备后,设备列表中就能看到对应智能吸顶灯设备,单击进去,就能看到智能吸顶灯的操作界面。
|
|
78
|
+
|
|
79
|
+
接下来还需要参考 设备端的跑通 Demo 文档将设备端的 Demo 跑通,就可以通过 App Demo 操作智能吸顶灯了。
|