From 928f238e4570aadd4eae3c32e8f038e9f94ad5c7 Mon Sep 17 00:00:00 2001 From: adamsfliu Date: Tue, 30 Apr 2024 11:35:12 +0800 Subject: [PATCH] [iOS] update version to relesse-11.8.0.5387 --- MLVB-API-Example-OC/Debug/GenerateTestUserSig.h | 10 +++++----- MLVB-API-Example-OC/Debug/GenerateTestUserSig.m | 2 +- .../MLVB-API-Example-OC.xcodeproj/project.pbxproj | 8 ++++---- MLVB-API-Example-OC/{README.cn.md => README-zh_CN.md} | 6 +++--- MLVB-API-Example-OC/README.md | 6 +++--- 5 files changed, 16 insertions(+), 16 deletions(-) rename MLVB-API-Example-OC/{README.cn.md => README-zh_CN.md} (91%) diff --git a/MLVB-API-Example-OC/Debug/GenerateTestUserSig.h b/MLVB-API-Example-OC/Debug/GenerateTestUserSig.h index 4d70091..52e2ff3 100755 --- a/MLVB-API-Example-OC/Debug/GenerateTestUserSig.h +++ b/MLVB-API-Example-OC/Debug/GenerateTestUserSig.h @@ -9,7 +9,7 @@ * Attention: 请不要将如下代码发布到您的线上正式版本的 App 中,原因如下: * * 本文件中的代码虽然能够正确计算出 UserSig,但仅适合快速调通 SDK 的基本功能,不适合线上产品, - * 这是因为客户端代码中的 SECRETKEY 很容易被反编译逆向破解,尤其是 Web 端的代码被破解的难度几乎为零。 + * 这是因为客户端代码中的 SDKSECRETKEY 很容易被反编译逆向破解,尤其是 Web 端的代码被破解的难度几乎为零。 * 一旦您的密钥泄露,攻击者就可以计算出正确的 UserSig 来盗用您的腾讯云流量。 * * 正确的做法是将 UserSig 的计算代码和加密密钥放在您的业务服务器上,然后由 App 按需向您的服务器获取实时算出的 UserSig。 @@ -27,7 +27,7 @@ * Attention: do not use the code below in your commercial app. This is because: * * The code may be able to calculate UserSig correctly, but it is only for quick testing of the SDK’s basic features, not for commercial apps. - * `SECRETKEY` in client code can be easily decompiled and reversed, especially on web. + * `SDKSECRETKEY` in client code can be easily decompiled and reversed, especially on web. * Once your key is disclosed, attackers will be able to steal your Tencent Cloud traffic. * * The correct method is to deploy the `UserSig` calculation code and encryption key on your project server so that your app can request from your server a `UserSig` that is calculated whenever one is needed. @@ -123,7 +123,7 @@ static const int EXPIRETIME = 0; * Note: this method is for testing only. Before commercial launch, please migrate the UserSig calculation code and key to your backend server to prevent key disclosure and traffic stealing. * Reference: https://cloud.tencent.com/document/product/647/17275#Server */ -static NSString * const SECRETKEY = @""; +static NSString * const SDKSECRETKEY = @""; @interface GenerateTestUserSig : NSObject @@ -135,7 +135,7 @@ static NSString * const SECRETKEY = @""; * @note: 请不要将如下代码发布到您的线上正式版本的 App 中,原因如下: * * 本文件中的代码虽然能够正确计算出 UserSig,但仅适合快速调通 SDK 的基本功能,不适合线上产品, - * 这是因为客户端代码中的 SECRETKEY 很容易被反编译逆向破解,尤其是 Web 端的代码被破解的难度几乎为零。 + * 这是因为客户端代码中的 SDKSECRETKEY 很容易被反编译逆向破解,尤其是 Web 端的代码被破解的难度几乎为零。 * 一旦您的密钥泄露,攻击者就可以计算出正确的 UserSig 来盗用您的腾讯云流量。 * * 正确的做法是将 UserSig 的计算代码和加密密钥放在您的业务服务器上,然后由 App 按需向您的服务器获取实时算出的 UserSig。 @@ -151,7 +151,7 @@ static NSString * const SECRETKEY = @""; * @note: do not use the code below in your commercial app. This is because: * * The code may be able to calculate UserSig correctly, but it is only for quick testing of the SDK’s basic features, not for commercial apps. - * `SECRETKEY` in client code can be easily decompiled and reversed, especially on web. + * `SDKSECRETKEY` in client code can be easily decompiled and reversed, especially on web. * Once your key is disclosed, attackers will be able to steal your Tencent Cloud traffic. * * The correct method is to deploy the `UserSig` calculation code on your project server so that your app can request from your server a `UserSig` that is calculated whenever one is needed. diff --git a/MLVB-API-Example-OC/Debug/GenerateTestUserSig.m b/MLVB-API-Example-OC/Debug/GenerateTestUserSig.m index 52ebc38..8f76c9d 100755 --- a/MLVB-API-Example-OC/Debug/GenerateTestUserSig.m +++ b/MLVB-API-Example-OC/Debug/GenerateTestUserSig.m @@ -52,7 +52,7 @@ + (NSString *)genTestUserSig:(NSString *)identifier + (NSString *)hmac:(NSString *)plainText { - const char *cKey = [SECRETKEY cStringUsingEncoding:NSUTF8StringEncoding]; + const char *cKey = [SDKSECRETKEY cStringUsingEncoding:NSUTF8StringEncoding]; const char *cData = [plainText cStringUsingEncoding:NSUTF8StringEncoding]; unsigned char cHMAC[CC_SHA256_DIGEST_LENGTH]; diff --git a/MLVB-API-Example-OC/MLVB-API-Example-OC.xcodeproj/project.pbxproj b/MLVB-API-Example-OC/MLVB-API-Example-OC.xcodeproj/project.pbxproj index 223c3b8..e927ca7 100644 --- a/MLVB-API-Example-OC/MLVB-API-Example-OC.xcodeproj/project.pbxproj +++ b/MLVB-API-Example-OC/MLVB-API-Example-OC.xcodeproj/project.pbxproj @@ -113,7 +113,7 @@ EB147B18282B908100C0E2DC /* ThirdBeautyTencentEffectViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = EB147B17282B908100C0E2DC /* ThirdBeautyTencentEffectViewController.xib */; }; EB147B1B282D2F1200C0E2DC /* ThirdBeautyEntranceViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = EB147B1A282D2F1200C0E2DC /* ThirdBeautyEntranceViewController.xib */; }; EB147B1D282D2F1700C0E2DC /* ThirdBeautyEntranceViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = EB147B1C282D2F1700C0E2DC /* ThirdBeautyEntranceViewController.m */; }; - ED14F7FE2B957E6500E52959 /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ED14F7FD2B957E6500E52959 /* CoreMotion.framework */; }; + ED14F7F22B91D5C100E52959 /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ED14F7F12B91D5C100E52959 /* CoreMotion.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -301,7 +301,7 @@ EB147B19282D2F0D00C0E2DC /* ThirdBeautyEntranceViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThirdBeautyEntranceViewController.h; sourceTree = ""; }; EB147B1A282D2F1200C0E2DC /* ThirdBeautyEntranceViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ThirdBeautyEntranceViewController.xib; sourceTree = ""; }; EB147B1C282D2F1700C0E2DC /* ThirdBeautyEntranceViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ThirdBeautyEntranceViewController.m; sourceTree = ""; }; - ED14F7FD2B957E6500E52959 /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; }; + ED14F7F12B91D5C100E52959 /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; }; FB3939E2552F6AFE9F587046 /* Pods-MLVB-API-Example-OC.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MLVB-API-Example-OC.debug.xcconfig"; path = "Target Support Files/Pods-MLVB-API-Example-OC/Pods-MLVB-API-Example-OC.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -310,7 +310,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - ED14F7FE2B957E6500E52959 /* CoreMotion.framework in Frameworks */, + ED14F7F22B91D5C100E52959 /* CoreMotion.framework in Frameworks */, 4723A7C426315FAA0094AC81 /* AVFoundation.framework in Frameworks */, 406AB164280048BB00A99B81 /* VideoToolbox.framework in Frameworks */, 88167CEC2685BF97001D99DC /* libz.tbd in Frameworks */, @@ -679,7 +679,7 @@ 88ED6FE02624364700C75B9D /* Frameworks */ = { isa = PBXGroup; children = ( - ED14F7FD2B957E6500E52959 /* CoreMotion.framework */, + ED14F7F12B91D5C100E52959 /* CoreMotion.framework */, 88BC38A12844710E00814931 /* GLKit.framework */, 47748037283E21F900505C4C /* CoreServices.framework */, 406AB169280048E100A99B81 /* MetalKit.framework */, diff --git a/MLVB-API-Example-OC/README.cn.md b/MLVB-API-Example-OC/README-zh_CN.md similarity index 91% rename from MLVB-API-Example-OC/README.cn.md rename to MLVB-API-Example-OC/README-zh_CN.md index d071f14..edc61f7 100644 --- a/MLVB-API-Example-OC/README.cn.md +++ b/MLVB-API-Example-OC/README-zh_CN.md @@ -34,7 +34,7 @@ ### 前提条件 您已 [注册腾讯云](https://cloud.tencent.com/document/product/378/17985) 账号,并完成 [实名认证](https://cloud.tencent.com/document/product/378/3629)。 -### 申请SDKAPPID 和 SECRETKEY +### 申请SDKAPPID 和 SDKSECRETKEY 1. 登录实时音视频控制台,选择【开发辅助】>【[快速跑通Demo](https://console.cloud.tencent.com/trtc/quickstart)】。 2. 单击【立即开始】,输入您的应用名称,例如`TestTRTC`,单击【创建应用】。 @@ -51,14 +51,14 @@ 3. 配置`GenerateTestUserSig.h`文件中的参数: - SDKAPPID:替换该变量值为上一步骤中在页面上看到的 SDKAppID。 - - SECRETKEY:替换该变量值为上一步骤中在页面上看到的密钥。 + - SDKSECRETKEY:替换该变量值为上一步骤中在页面上看到的密钥。 - LICENSEURL:默认为 PLACEHOLDER ,请设置为实际的License Url信息; - LICENSEURLKEY:默认为 PLACEHOLDER ,请设置为实际的License Key信息; - PUSH_DOMAIN 中推流地址请设置为您的推流域名的 `CNAME`。 - PLAY_DOMAIN 中拉流地址请设置为您的播放域名的 `CNAME`。 - LIVE_URL_KEY:非必需,用于生成 txSecret 等鉴权信息。 ->!本文提到的生成 UserSig 的方案是在客户端代码中配置 SECRETKEY,该方法中 SECRETKEY 很容易被反编译逆向破解,一旦您的密钥泄露,攻击者就可以盗用您的腾讯云流量,因此**该方法仅适合本地跑通 Demo 和功能调试**。 +>!本文提到的生成 UserSig 的方案是在客户端代码中配置 SDKSECRETKEY,该方法中 SDKSECRETKEY 很容易被反编译逆向破解,一旦您的密钥泄露,攻击者就可以盗用您的腾讯云流量,因此**该方法仅适合本地跑通 Demo 和功能调试**。 >正确的 UserSig 签发方式是将 UserSig 的计算代码集成到您的服务端,并提供面向 App 的接口,在需要 UserSig 时由您的 App 向业务服务器发起请求获取动态 UserSig。更多详情请参见 [服务端生成 UserSig](https://cloud.tencent.com/document/product/647/17275#Server)。 ### 编译运行 diff --git a/MLVB-API-Example-OC/README.md b/MLVB-API-Example-OC/README.md index 9391ac2..e2eaf9d 100644 --- a/MLVB-API-Example-OC/README.md +++ b/MLVB-API-Example-OC/README.md @@ -1,5 +1,5 @@ # MLVB API-Example -[简体中文](README.cn.md) | English +[简体中文](README-zh_CN.md) | English ## Background This open-source demo shows how to use some APIs of the [MLVB SDK](https://www.tencentcloud.com/document/product/1071) to help you better understand the APIs and use them to implement some basic MLVB features. @@ -50,14 +50,14 @@ You have [signed up for a Tencent Cloud account](https://intl.cloud.tencent.com/ 3. Set parameters in `GenerateTestUserSig.h` as follows: - `SDKAPPID`: set it to the `SDKAppID` obtained in the previous step. - - `SECRETKEY`: set it to the secret key obtained in the previous step. + - `SDKSECRETKEY`: set it to the secret key obtained in the previous step. - `LICENSEURL`: a placeholder by default. Set it to the actual license URL. - `LICENSEURLKEY`: a placeholder by default. Set it to the actual license key. - `PUSH_DOMAIN`: set it to the configured publishing URL. - `PLAY_DOMAIN`: set it to the configured playback URL. - `LIVE_URL_KEY`: set it to the authentication key (if authentication configuration is enabled). ->!The method for generating `UserSig` described in this document involves configuring `SECRETKEY` in client code. In this method, `SECRETKEY` 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 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 send a request to the business server for a dynamic `UserSig`. For more information, please see [How do I calculate UserSig on the server?](https://www.tencentcloud.com/document/product/1071/39471). ## Compiling and running the project