diff --git a/TRTC-API-Example-OC/App/Info.plist b/TRTC-API-Example-OC/App/Info.plist index 2866a9f..0faea0f 100755 --- a/TRTC-API-Example-OC/App/Info.plist +++ b/TRTC-API-Example-OC/App/Info.plist @@ -17,7 +17,7 @@ CFBundleShortVersionString 1.0 CFBundleVersion - 3963 + 5387 LSRequiresIPhoneOS NSAppTransportSecurity diff --git a/TRTC-API-Example-Swift/README.md b/TRTC-API-Example-OC/README-zh_CN.md similarity index 93% rename from TRTC-API-Example-Swift/README.md rename to TRTC-API-Example-OC/README-zh_CN.md index f97b137..702c337 100644 --- a/TRTC-API-Example-Swift/README.md +++ b/TRTC-API-Example-OC/README-zh_CN.md @@ -1,6 +1,5 @@ -# TRTC API-Example Swift - -中文 | [English](README.en.md) +# TRTC API-Example +_中文 | [English](README.md)_ ## 前言 这个开源示例Demo主要演示了 [TRTC 实时音视频 SDK](https://cloud.tencent.com/document/product/647/32689) 部分API的使用示例,帮助开发者可以更好的理解 TRTC 实时音视频 SDK 的API,从而快速实现一些音视频场景的基本功能。 @@ -24,11 +23,13 @@ - [自定义视频采集&渲染](./Advanced/CustomCamera) - [设置音效](./Advanced/SetAudioEffect) - [设置背景音乐](./Advanced/SetBackgroundMusic) + - [本地视频文件分享](./Advanced/LocalVideoShare) - [本地视频录制](./Advanced/LocalRecord) - [加入多个房间](./Advanced/JoinMultipleRoom) - [收发SEI消息](./Advanced/SEIMessage) - [快速切换房间](./Advanced/SwitchRoom) - [跨房PK](./Advanced/RoomPk) + - [第三方美颜](./Advanced/ThirdBeauty) - [画中画功能](./Advanced/PictureInPicture) @@ -52,8 +53,8 @@ ### 配置 Demo 工程文件 -1. 打开 Debug 目录下的 [GenerateTestUserSig.swift](Debug/GenerateTestUserSig.swift) 文件。 -2. 配置`GenerateTestUserSig.swift`文件中的两个参数: +1. 打开 Debug 目录下的 [GenerateTestUserSig.h](debug/GenerateTestUserSig.h) 文件。 +2. 配置`GenerateTestUserSig.h`文件中的两个参数: - SDKAPPID:替换该变量值为上一步骤中在页面上看到的 SDKAppID。 - SDKSECRETKEY:替换该变量值为上一步骤中在页面上看到的密钥。 ![ #900px](https://main.qcloudimg.com/raw/8fb309ce8c378dd3ad2c0099c57795a5.png) diff --git a/TRTC-API-Example-OC/README.en.md b/TRTC-API-Example-OC/README.en.md deleted file mode 100644 index 8c9ef46..0000000 --- a/TRTC-API-Example-OC/README.en.md +++ /dev/null @@ -1,87 +0,0 @@ -# TRTC API-Example -[中文](README.md) | English - -## Background -This open-source demo shows how to use some APIs of the [TRTC SDK](https://www.tencentcloud.com/document/product/647/34615) to help you better understand the APIs and use them to implement some basic TRTC features. - -## Contents -This demo covers the following features (click to view the details of a feature): - -- Basic Features - - [Audio Call](./Basic/AudioCall) - - [Video Call](./Basic/VideoCall) - - [Interactive Live Video Streaming](./Basic/Live) - - [Interactive Live Audio Streaming](./Basic/VoiceChatRoom) - - [Screen Sharing Live Streaming](./Basic/ScreenShare) -- Advanced Features - - [String-type Room IDs](./Advanced/StringRoomId) - - [Video Quality Setting](./Advanced/SetVideoQuality) - - [Audio Quality Setting](./Advanced/SetAudioQuality) - - [Rendering Control](./Advanced/SetRenderParams) - - [Network Speed Testing](./Advanced/SpeedTest) - - [CDN Publishing](./Advanced/PushCDN) - - [Custom Video Capturing & Rendering](./Advanced/CustomCamera) - - [Audio Effect Setting](./Advanced/SetAudioEffect) - - [Background Music Setting](./Advanced/SetBackgroundMusic) - - [Local Video Sharing](./Advanced/LocalVideoShare) - - [Local Video Recording](./Advanced/LocalRecord) - - [Multiple Room Entry](./Advanced/JoinMultipleRoom) - - [SEI Message Receiving/Sending](./Advanced/SEIMessage) - - [Room Switching](./Advanced/SwitchRoom) - - [Cross-Room Competition](./Advanced/RoomPk) - - [Third-Party Beauty Filters](./Advanced/ThirdBeauty) - -## Environment Requirements -- Xcode 11.0 and above -- Please make sure that your project has set a valid developer signature - - -## Demo Run Example - -#### Prerequisites -You have [signed up for a Tencent Cloud account](https://intl.cloud.tencent.com/document/product/378/17985) and completed [identity verification](https://intl.cloud.tencent.com/document/product/378/3629). - - -### Obtaining `SDKAPPID` and `SDKSECRETKEY` -1. Log in to the TRTC console and select **Application Management** > **[Create application](https://console.tencentcloud.com/trtc/app/create)**. -2. Enter an application name such as `TestTRTC`, and click **Next**. - -![ #900px](https://qcloudimg.tencent-cloud.cn/raw/51c73a617e69a76ed26e6f74b0071ec9.png) -3. Click **Next** to view your `SDKAppID` and key. - - -### Configuring demo project files -1. Open the [GenerateTestUserSig.h](debug/GenerateTestUserSig.h) file in the Debug directory. -2. Configure two parameters in the `GenerateTestUserSig.h` file: - - `SDKAPPID`: `PLACEHOLDER` by default. Set it to the actual `SDKAppID`. - - `SDKSECRETKEY`: left empty by default. Set it to the actual key. - ![ #900px](https://qcloudimg.tencent-cloud.cn/raw/79a57d5e09bb050d8798492732cfd33b/TRTC-sdkAppId-iOS.png) - -3. Return to the TRTC console and click **Next**. -4. Click **Return to Overview Page**. - ->!The method for generating `UserSig` described in this document involves configuring `SDKSECRETKEY` in client code. In this method, `SDKSECRETKEY` may be easily decompiled and reversed, and if your key is disclosed, attackers can steal your Tencent Cloud traffic. Therefore, **this method is suitable only for the local execution and debugging of the demo**. ->The correct `UserSig` distribution method is to integrate the calculation code of `UserSig` into your server and provide an application-oriented API. When `UserSig` is needed, your application can make a request to the business server for dynamic `UserSig`. For more information, please see [How to Calculate UserSig](https://www.tencentcloud.com/document/product/647/35166). - -## Configuring CDN parameters (optional) -To use CDN services, which are needed for co-anchoring, CDN playback, etc., you need to configure three **live streaming** parameters. - -For detailed instructions, see [CDN Relayed Live Streaming](https://www.tencentcloud.com/document/product/647/47858). - - -### Compiling and running the project -Use XCode (11.0 and above) to open TRTC-API-Example-OC.xcodeproj in the source directory - - -## Contact Us -- If you have questions, see [FAQs](https://www.tencentcloud.com/document/product/647/36057). - -- To learn about how the TRTC SDK can be used in different scenarios, see [Sample Code](https://www.tencentcloud.com/document/product/647/42963). - -- For complete API documentation, see [SDK API Documentation](https://www.tencentcloud.com/document/product/647/35119). - -- Communication & Feedback -Welcome to join our Telegram Group to communicate with our professional engineers! We are more than happy to hear from you~ -Click to join: [https://t.me/+EPk6TMZEZMM5OGY1](https://t.me/+EPk6TMZEZMM5OGY1) -Or scan the QR code - diff --git a/TRTC-API-Example-OC/README.md b/TRTC-API-Example-OC/README.md index 314218a..2cdd942 100644 --- a/TRTC-API-Example-OC/README.md +++ b/TRTC-API-Example-OC/README.md @@ -1,85 +1,87 @@ # TRTC API-Example -_中文 | [English](README.en.md)_ - -## 前言 -这个开源示例Demo主要演示了 [TRTC 实时音视频 SDK](https://cloud.tencent.com/document/product/647/32689) 部分API的使用示例,帮助开发者可以更好的理解 TRTC 实时音视频 SDK 的API,从而快速实现一些音视频场景的基本功能。 - -## 结构说明 -在这个示例项目中包含了以下场景:(带上对应的跳转目录,方便用户快速浏览感兴趣的功能) - -- 基础功能 - - [语音通话](./Basic/AudioCall) - - [视频通话](./Basic/VideoCall) - - [视频互动直播](./Basic/Live) - - [语音互动直播](./Basic/VoiceChatRoom) - - [录屏直播](./Basic/ScreenShare) -- 进阶功能 - - [字符串房间号](./Advanced/StringRoomId) - - [画质设定](./Advanced/SetVideoQuality) - - [音质设定](./Advanced/SetAudioQuality) - - [渲染控制](./Advanced/SetRenderParams) - - [网络测速](./Advanced/SpeedTest) - - [CDN发布](./Advanced/PushCDN) - - [自定义视频采集&渲染](./Advanced/CustomCamera) - - [设置音效](./Advanced/SetAudioEffect) - - [设置背景音乐](./Advanced/SetBackgroundMusic) - - [本地视频文件分享](./Advanced/LocalVideoShare) - - [本地视频录制](./Advanced/LocalRecord) - - [加入多个房间](./Advanced/JoinMultipleRoom) - - [收发SEI消息](./Advanced/SEIMessage) - - [快速切换房间](./Advanced/SwitchRoom) - - [跨房PK](./Advanced/RoomPk) - - [第三方美颜](./Advanced/ThirdBeauty) - - [画中画功能](./Advanced/PictureInPicture) - - -## 环境准备 -- Xcode 11.0及以上版本 -- 请确保您的项目已设置有效的开发者签名 - - -## 运行示例 - -### 前提条件 -您已 [注册腾讯云](https://cloud.tencent.com/document/product/378/17985) 账号,并完成 [实名认证](https://cloud.tencent.com/document/product/378/3629)。 - - -### 申请 SDKAPPID 和 SDKSECRETKEY -1. 登录实时音视频控制台,选择【开发辅助】>【[快速跑通Demo](https://console.cloud.tencent.com/trtc/quickstart)】。 -2. 单击【立即开始】,输入您的应用名称,例如`TestTRTC`,单击【创建应用】。 - -![](https://main.qcloudimg.com/raw/169391f6711857dca6ed8cfce7b391bd.png) -3. 创建应用完成后,单击【我已下载,下一步】,可以查看 SDKAppID 和密钥信息。 - - -### 配置 Demo 工程文件 -1. 打开 Debug 目录下的 [GenerateTestUserSig.h](debug/GenerateTestUserSig.h) 文件。 -2. 配置`GenerateTestUserSig.h`文件中的两个参数: - - SDKAPPID:替换该变量值为上一步骤中在页面上看到的 SDKAppID。 - - SDKSECRETKEY:替换该变量值为上一步骤中在页面上看到的密钥。 - ![ #900px](https://main.qcloudimg.com/raw/8fb309ce8c378dd3ad2c0099c57795a5.png) - -4. 返回实时音视频控制台,单击【粘贴完成,下一步】。 -5. 单击【关闭指引,进入控制台管理应用】。 - ->!本文提到的生成 UserSig 的方案是在客户端代码中配置 SDKSECRETKEY,该方法中 SDKSECRETKEY 很容易被反编译逆向破解,一旦您的密钥泄露,攻击者就可以盗用您的腾讯云流量,因此**该方法仅适合本地跑通 Demo 和功能调试**。 ->正确的 UserSig 签发方式是将 UserSig 的计算代码集成到您的服务端,并提供面向 App 的接口,在需要 UserSig 时由您的 App 向业务服务器发起请求获取动态 UserSig。更多详情请参见 [服务端生成 UserSig](https://cloud.tencent.com/document/product/647/17275#Server)。 - -### 配置CDN 相关(可选) -如果您需要使用CDN相关业务,比如主播使用TRTC SDK互动连麦,观众端播放CDN流这样的方式,您还需要配置如下三个**直播**相关参数: -- `BIZID`; -- `APPID`; -- `CDN_DOMAIN_NAME`; - -![ #900px](https://liteav.sdk.qcloud.com/doc/res/trtc/picture/bizid_appid_scree.png) - -详细操作可以参考 [实现 CDN 直播观看](https://cloud.tencent.com/document/product/647/16826#.E9.80.82.E7.94.A8.E5.9C.BA.E6.99.AF) - ->注意: ->本文提到的生成 UserSig 的方案是在客户端代码中配置 SDKSECRETKEY,该方法中 SDKSECRETKEY 很容易被反编译逆向破解,一旦您的密钥泄露,攻击者就可以盗用您的腾讯云流量,因此**该方法仅适合本地跑通 Demo 和功能调试**。 ->正确的 UserSig 签发方式请参见 [服务端生成 UserSig](https://cloud.tencent.com/document/product/647/17275#Server)。 - -### 编译运行 -使用 XCode(11.0及以上的版本)打开源码目录下的 TRTC-API-Example-OC.xcodeproj -> 上述流程并没有解答您的疑问,你可以[点击此处](https://wj.qq.com/s2/8393513/f442/)反馈,我们的**工程师妹子**会尽快处理! +[中文](README-zh_CN.md) | English +## Background +This open-source demo shows how to use some APIs of the [TRTC SDK](https://www.tencentcloud.com/document/product/647/34615) to help you better understand the APIs and use them to implement some basic TRTC features. + +## Contents +This demo covers the following features (click to view the details of a feature): + +- Basic Features + - [Audio Call](./Basic/AudioCall) + - [Video Call](./Basic/VideoCall) + - [Interactive Live Video Streaming](./Basic/Live) + - [Interactive Live Audio Streaming](./Basic/VoiceChatRoom) + - [Screen Sharing Live Streaming](./Basic/ScreenShare) +- Advanced Features + - [String-type Room IDs](./Advanced/StringRoomId) + - [Video Quality Setting](./Advanced/SetVideoQuality) + - [Audio Quality Setting](./Advanced/SetAudioQuality) + - [Rendering Control](./Advanced/SetRenderParams) + - [Network Speed Testing](./Advanced/SpeedTest) + - [CDN Publishing](./Advanced/PushCDN) + - [Custom Video Capturing & Rendering](./Advanced/CustomCamera) + - [Audio Effect Setting](./Advanced/SetAudioEffect) + - [Background Music Setting](./Advanced/SetBackgroundMusic) + - [Local Video Sharing](./Advanced/LocalVideoShare) + - [Local Video Recording](./Advanced/LocalRecord) + - [Multiple Room Entry](./Advanced/JoinMultipleRoom) + - [SEI Message Receiving/Sending](./Advanced/SEIMessage) + - [Room Switching](./Advanced/SwitchRoom) + - [Cross-Room Competition](./Advanced/RoomPk) + - [Third-Party Beauty Filters](./Advanced/ThirdBeauty) + +## Environment Requirements +- Xcode 11.0 and above +- Please make sure that your project has set a valid developer signature + + +## Demo Run Example + +#### Prerequisites +You have [signed up for a Tencent Cloud account](https://intl.cloud.tencent.com/document/product/378/17985) and completed [identity verification](https://intl.cloud.tencent.com/document/product/378/3629). + + +### Obtaining `SDKAPPID` and `SDKSECRETKEY` +1. Log in to the TRTC console and select **Application Management** > **[Create application](https://console.tencentcloud.com/trtc/app/create)**. +2. Enter an application name such as `TestTRTC`, and click **Next**. + +![ #900px](https://qcloudimg.tencent-cloud.cn/raw/51c73a617e69a76ed26e6f74b0071ec9.png) +3. Click **Next** to view your `SDKAppID` and key. + + +### Configuring demo project files +1. Open the [GenerateTestUserSig.h](debug/GenerateTestUserSig.h) file in the Debug directory. +2. Configure two parameters in the `GenerateTestUserSig.h` file: + - `SDKAPPID`: `PLACEHOLDER` by default. Set it to the actual `SDKAppID`. + - `SDKSECRETKEY`: left empty by default. Set it to the actual key. + ![ #900px](https://qcloudimg.tencent-cloud.cn/raw/79a57d5e09bb050d8798492732cfd33b/TRTC-sdkAppId-iOS.png) + +3. Return to the TRTC console and click **Next**. +4. Click **Return to Overview Page**. + +>!The method for generating `UserSig` described in this document involves configuring `SDKSECRETKEY` in client code. In this method, `SDKSECRETKEY` may be easily decompiled and reversed, and if your key is disclosed, attackers can steal your Tencent Cloud traffic. Therefore, **this method is suitable only for the local execution and debugging of the demo**. +>The correct `UserSig` distribution method is to integrate the calculation code of `UserSig` into your server and provide an application-oriented API. When `UserSig` is needed, your application can make a request to the business server for dynamic `UserSig`. For more information, please see [How to Calculate UserSig](https://www.tencentcloud.com/document/product/647/35166). + +## Configuring CDN parameters (optional) +To use CDN services, which are needed for co-anchoring, CDN playback, etc., you need to configure three **live streaming** parameters. + +For detailed instructions, see [CDN Relayed Live Streaming](https://www.tencentcloud.com/document/product/647/47858). + + +### Compiling and running the project +Use XCode (11.0 and above) to open TRTC-API-Example-OC.xcodeproj in the source directory + + +## Contact Us +- If you have questions, see [FAQs](https://www.tencentcloud.com/document/product/647/36057). + +- To learn about how the TRTC SDK can be used in different scenarios, see [Sample Code](https://www.tencentcloud.com/document/product/647/42963). + +- For complete API documentation, see [SDK API Documentation](https://www.tencentcloud.com/document/product/647/35119). + +- Communication & Feedback +Welcome to join our Telegram Group to communicate with our professional engineers! We are more than happy to hear from you~ +Click to join: [https://t.me/+EPk6TMZEZMM5OGY1](https://t.me/+EPk6TMZEZMM5OGY1) +Or scan the QR code + diff --git a/TRTC-API-Example-OC/TRTC-API-Example-OC.xcodeproj/project.pbxproj b/TRTC-API-Example-OC/TRTC-API-Example-OC.xcodeproj/project.pbxproj index ca3c9a0..5c972f1 100644 --- a/TRTC-API-Example-OC/TRTC-API-Example-OC.xcodeproj/project.pbxproj +++ b/TRTC-API-Example-OC/TRTC-API-Example-OC.xcodeproj/project.pbxproj @@ -128,7 +128,7 @@ D6D63B7025D86CFC1006B19E /* Pods_TRTC_API_Example_OC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C9B2CC51BDD884255109D5F7 /* Pods_TRTC_API_Example_OC.framework */; }; EB147B20282E477900C0E2DC /* ThirdBeautyTencentEffectViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EB147B1F282E477900C0E2DC /* ThirdBeautyTencentEffectViewController.m */; }; EB147B22282E477E00C0E2DC /* ThirdBeautyTencentEffectViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = EB147B21282E477E00C0E2DC /* ThirdBeautyTencentEffectViewController.xib */; }; - ED14F8002B957E7C00E52959 /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ED14F7FF2B957E7C00E52959 /* CoreMotion.framework */; }; + ED14F7F42B91D5DA00E52959 /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ED14F7F32B91D5DA00E52959 /* CoreMotion.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -349,7 +349,7 @@ EB147B1F282E477900C0E2DC /* ThirdBeautyTencentEffectViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ThirdBeautyTencentEffectViewController.m; sourceTree = ""; }; EB147B21282E477E00C0E2DC /* ThirdBeautyTencentEffectViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ThirdBeautyTencentEffectViewController.xib; sourceTree = ""; }; EBAF1EF2283243C600BE7998 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; }; - ED14F7FF2B957E7C00E52959 /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; }; + ED14F7F32B91D5DA00E52959 /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; }; FC1FE5DC9D70E1703C9DD80A /* Pods-TXReplayKit_Screen.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TXReplayKit_Screen.debug.xcconfig"; path = "Target Support Files/Pods-TXReplayKit_Screen/Pods-TXReplayKit_Screen.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -358,7 +358,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - ED14F8002B957E7C00E52959 /* CoreMotion.framework in Frameworks */, + ED14F7F42B91D5DA00E52959 /* CoreMotion.framework in Frameworks */, 7DE039A8288AACC6009C3F1F /* Accelerate.framework in Frameworks */, 7DE0399A288AABB0009C3F1F /* SystemConfiguration.framework in Frameworks */, 7DE0399F288AAC32009C3F1F /* libc++.tbd in Frameworks */, @@ -877,7 +877,7 @@ 88ED6FE02624364700C75B9D /* Frameworks */ = { isa = PBXGroup; children = ( - ED14F7FF2B957E7C00E52959 /* CoreMotion.framework */, + ED14F7F32B91D5DA00E52959 /* CoreMotion.framework */, 88BC38A5284471F300814931 /* GLKit.framework */, EBAF1EF2283243C600BE7998 /* MobileCoreServices.framework */, 880DC44928042E7200278CAC /* SystemConfiguration.framework */, diff --git a/TRTC-API-Example-Swift/README.en.md b/TRTC-API-Example-Swift/README.en.md deleted file mode 100644 index da6912b..0000000 --- a/TRTC-API-Example-Swift/README.en.md +++ /dev/null @@ -1,86 +0,0 @@ -# TRTC API-Example Swift -[中文](README.md) | English - -## Background -This open-source demo shows how to use some APIs of the [TRTC SDK](https://www.tencentcloud.com/document/product/647/34615) to help you better understand the APIs and use them to implement some basic TRTC features. - -## Contents -This demo covers the following features (click to view the details of a feature): - -- Basic Features - - [Audio Call](./Basic/AudioCall) - - [Video Call](./Basic/VideoCall) - - [Interactive Live Video Streaming](./Basic/Live) - - [Interactive Live Audio Streaming](./Basic/VoiceChatRoom) - - [Screen Sharing Live Streaming](./Basic/ScreenShare) -- Advanced Features - - [String-type Room IDs](./Advanced/StringRoomId) - - [Video Quality Setting](./Advanced/SetVideoQuality) - - [Audio Quality Setting](./Advanced/SetAudioQuality) - - [Rendering Control](./Advanced/SetRenderParams) - - [Network Speed Testing](./Advanced/SpeedTest) - - [CDN Publishing](./Advanced/PushCDN) - - [Custom Video Capturing & Rendering](./Advanced/CustomCamera) - - [Audio Effect Setting](./Advanced/SetAudioEffect) - - [Background Music Setting](./Advanced/SetBackgroundMusic) - - [Local Video Recording](./Advanced/LocalRecord) - - [Multiple Room Entry](./Advanced/JoinMultipleRoom) - - [SEI Message Receiving/Sending](./Advanced/SEIMessage) - - [Room Switching](./Advanced/SwitchRoom) - - [Cross-Room Competition](./Advanced/RoomPk) - - [Picture-In-Picture](./Advanced/PictureInPicture) - -## Environment Requirements -- Xcode 11.0 and above -- Please make sure that your project has set a valid developer signature - - -## Demo Run Example - -#### Prerequisites -You have [signed up for a Tencent Cloud account](https://intl.cloud.tencent.com/document/product/378/17985) and completed [identity verification](https://intl.cloud.tencent.com/document/product/378/3629). - - -### Obtaining `SDKAPPID` and `SDKSECRETKEY` -1. Log in to the TRTC console and select **Application Management** > **[Create application](https://console.tencentcloud.com/trtc/app/create)**. -2. Enter an application name such as `TestTRTC`, and click **Next**. - -![ #900px](https://qcloudimg.tencent-cloud.cn/raw/51c73a617e69a76ed26e6f74b0071ec9.png) -3. Click **Next** to view your `SDKAppID` and key. - - -### Configuring demo project files -1. Open the [GenerateTestUserSig.swift](Debug/GenerateTestUserSig.swift) file in the Debug directory. -2. Configure two parameters in the `GenerateTestUserSig.swift` file: - - `SDKAPPID`: `PLACEHOLDER` by default. Set it to the actual `SDKAppID`. - - `SDKSECRETKEY`: left empty by default. Set it to the actual key. - ![ #900px](https://qcloudimg.tencent-cloud.cn/raw/79a57d5e09bb050d8798492732cfd33b/TRTC-sdkAppId-iOS.png) - -3. Return to the TRTC console and click **Next**. -4. Click **Return to Overview Page**. - ->!The method for generating `UserSig` described in this document involves configuring `SDKSECRETKEY` in client code. In this method, `SDKSECRETKEY` may be easily decompiled and reversed, and if your key is disclosed, attackers can steal your Tencent Cloud traffic. Therefore, **this method is suitable only for the local execution and debugging of the demo**. ->The correct `UserSig` distribution method is to integrate the calculation code of `UserSig` into your server and provide an application-oriented API. When `UserSig` is needed, your application can make a request to the business server for dynamic `UserSig`. For more information, please see [How to Calculate UserSig](https://www.tencentcloud.com/document/product/647/35166). - -## Configuring CDN parameters (optional) -To use CDN services, which are needed for co-anchoring, CDN playback, etc., you need to configure three **live streaming** parameters. - -For detailed instructions, see [CDN Relayed Live Streaming](https://www.tencentcloud.com/document/product/647/47858). - - -### Compiling and running the project -Use XCode (11.0 and above) to open TRTC-API-Example-OC.xcodeproj in the source directory - - -## Contact Us -- If you have questions, see [FAQs](https://www.tencentcloud.com/document/product/647/36057). - -- To learn about how the TRTC SDK can be used in different scenarios, see [Sample Code](https://www.tencentcloud.com/document/product/647/42963). - -- For complete API documentation, see [SDK API Documentation](https://www.tencentcloud.com/document/product/647/35119). - -- Communication & Feedback -Welcome to join our Telegram Group to communicate with our professional engineers! We are more than happy to hear from you~ -Click to join: [https://t.me/+EPk6TMZEZMM5OGY1](https://t.me/+EPk6TMZEZMM5OGY1) -Or scan the QR code - diff --git a/TRTC-API-Example-Swift/TRTC-API-Example-Swift.xcodeproj/project.pbxproj b/TRTC-API-Example-Swift/TRTC-API-Example-Swift.xcodeproj/project.pbxproj index 7818416..9f601d3 100644 --- a/TRTC-API-Example-Swift/TRTC-API-Example-Swift.xcodeproj/project.pbxproj +++ b/TRTC-API-Example-Swift/TRTC-API-Example-Swift.xcodeproj/project.pbxproj @@ -8,8 +8,8 @@ /* Begin PBXBuildFile section */ 471A24B928ACE44600BEFE63 /* PictureInPictureViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 471A24B828ACE44600BEFE63 /* PictureInPictureViewController.swift */; }; - 47FE4C462A3185C100D1C82F /* TXLiteAVSDK_TRTC.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 47FE4C452A3185C000D1C82F /* TXLiteAVSDK_TRTC.xcframework */; }; - 47FE4C472A3185C100D1C82F /* TXLiteAVSDK_TRTC.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 47FE4C452A3185C000D1C82F /* TXLiteAVSDK_TRTC.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 47E3E66B2A5D2F2900B3A243 /* TXLiteAVSDK_TRTC.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 47E3E66A2A5D2F2800B3A243 /* TXLiteAVSDK_TRTC.xcframework */; }; + 47E3E66C2A5D2F2900B3A243 /* TXLiteAVSDK_TRTC.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 47E3E66A2A5D2F2800B3A243 /* TXLiteAVSDK_TRTC.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 7D7178172877C4AE00926479 /* Localized.strings in Resources */ = {isa = PBXBuildFile; fileRef = 7D7178132877C4AE00926479 /* Localized.strings */; }; 7D7178182877C4AE00926479 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 7D7178152877C4AE00926479 /* InfoPlist.strings */; }; 7D71781E2877C4B700926479 /* Localized.strings in Resources */ = {isa = PBXBuildFile; fileRef = 7D71781A2877C4B700926479 /* Localized.strings */; }; @@ -77,7 +77,7 @@ 82CA7D0C28607698005F5A75 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 82CA7D04286072EE005F5A75 /* Main.storyboard */; }; 82E0F4EE28630549002281F9 /* HomeTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82E0F4ED28630549002281F9 /* HomeTableViewCell.swift */; }; 82E0F4F028630569002281F9 /* HomeTableSectionHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82E0F4EF28630569002281F9 /* HomeTableSectionHeaderView.swift */; }; - ED14F8012B957EA500E52959 /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7DCF41FD28655E4300597D8F /* CoreMotion.framework */; }; + ED14F7F52B91D5EC00E52959 /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7DCF41FD28655E4300597D8F /* CoreMotion.framework */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -88,7 +88,7 @@ dstSubfolderSpec = 10; files = ( 7DCA9AA7286468710094CB8D /* TXFFmpeg.xcframework in Embed Frameworks */, - 47FE4C472A3185C100D1C82F /* TXLiteAVSDK_TRTC.xcframework in Embed Frameworks */, + 47E3E66C2A5D2F2900B3A243 /* TXLiteAVSDK_TRTC.xcframework in Embed Frameworks */, 7DCA9AAA286468730094CB8D /* TXSoundTouch.xcframework in Embed Frameworks */, ); name = "Embed Frameworks"; @@ -98,7 +98,7 @@ /* Begin PBXFileReference section */ 471A24B828ACE44600BEFE63 /* PictureInPictureViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PictureInPictureViewController.swift; sourceTree = ""; }; - 47FE4C452A3185C000D1C82F /* TXLiteAVSDK_TRTC.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = TXLiteAVSDK_TRTC.xcframework; path = ../SDK/TXLiteAVSDK_TRTC.xcframework; sourceTree = ""; }; + 47E3E66A2A5D2F2800B3A243 /* TXLiteAVSDK_TRTC.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = TXLiteAVSDK_TRTC.xcframework; path = ../SDK/TXLiteAVSDK_TRTC.xcframework; sourceTree = ""; }; 7D7178142877C4AE00926479 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = Localized.strings; sourceTree = ""; }; 7D7178162877C4AE00926479 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = InfoPlist.strings; sourceTree = ""; }; 7D71781B2877C4B700926479 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = Localized.strings; sourceTree = ""; }; @@ -176,7 +176,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - ED14F8012B957EA500E52959 /* CoreMotion.framework in Frameworks */, + ED14F7F52B91D5EC00E52959 /* CoreMotion.framework in Frameworks */, 7DCF420028655EA900597D8F /* ReplayKit.framework in Frameworks */, 7DCF41EA28655BC900597D8F /* AVFoundation.framework in Frameworks */, 7DCF41F828655C2F00597D8F /* SystemConfiguration.framework in Frameworks */, @@ -187,7 +187,7 @@ 7DCF41EC28655BD400597D8F /* CoreMedia.framework in Frameworks */, 7DCF41FB28655CA700597D8F /* libresolv.tbd in Frameworks */, 7DCF41E828655BBC00597D8F /* AssetsLibrary.framework in Frameworks */, - 47FE4C462A3185C100D1C82F /* TXLiteAVSDK_TRTC.xcframework in Frameworks */, + 47E3E66B2A5D2F2900B3A243 /* TXLiteAVSDK_TRTC.xcframework in Frameworks */, 7DCF41F628655C2300597D8F /* OpenGLES.framework in Frameworks */, 7DCA9AA6286468710094CB8D /* TXFFmpeg.xcframework in Frameworks */, 7DCF41F428655C0E00597D8F /* MobileCoreServices.framework in Frameworks */, @@ -303,7 +303,7 @@ 7DCA9AAE28646A660094CB8D /* Frameworks */ = { isa = PBXGroup; children = ( - 47FE4C452A3185C000D1C82F /* TXLiteAVSDK_TRTC.xcframework */, + 47E3E66A2A5D2F2800B3A243 /* TXLiteAVSDK_TRTC.xcframework */, 7DCF41FF28655EA900597D8F /* ReplayKit.framework */, 7DCF41FD28655E4300597D8F /* CoreMotion.framework */, 7DCF41FA28655C4C00597D8F /* libsqlite3.0.tbd */,