This document describes how to quickly run the Tencent Cloud TRTC demo for iOS and macOS.
TestTRTC, and click Create.
SDKAppIDand secret key.
Decompress the source package downloaded in step 2.
Find and open the
|Platform||Relative Path to File|
Set parameters in the
Return to the TRTC console and click Pasted and Next.
Click Close Guide and Enter Console to Manage Applications.
The method for generating
UserSigdescribed in this document involves configuring
SECRETKEYin client code. In this method,
SECRETKEYmay be easily decompiled and reversed, and if your key is leaked, attackers can steal your Tencent Cloud traffic. Therefore, this method is only suitable for the local execution and debugging of the demo.
UserSigdistribution method is to integrate the calculation code of
UserSiginto your server and provide an application-oriented API. When
UserSigis needed, your application can send a request to the business server for a dynamic
UserSig. For more information, see How do I calculate UserSig on the server?.
TRTCScenesDemo > Podfilefile of the source code is located in a terminal window.
pod installcommand to install the TRTC SDK, or run the
pod updatecommand to update the local library.
TXLiteAVDemo.xcworkspaceproject in the source code directory, and compile and run the project.
TRTC SDK 6.6 (August 2019) and later versions use the new signature algorithm HMAC-SHA256. If your application was created before August 2019, you need to upgrade the signature algorithm to get a new secret key. Without upgrading, you can continue to use the old algorithm ECDSA-SHA256. After upgrading, you can switch between the new and old algorithms as needed.
Make sure that the two mobile phones use different
UserIDs. With TRTC, you cannot use the same
UserID on two devices simultaneously unless the
SDKAppIDs are different.
The SDK uses the UDP protocol for audio/video transmission and therefore cannot be used in office networks that block UDP. If you encounter such a problem, see How to Deal with Firewall Restrictions for assistance.