2. In the popup page, select RTC Engine, enter the application name, and then click Create.
Step 2. Get your SDKAppId and SecretKey
After your application created, you can get your SDKAppID and SDKSecretKey on Basic informaction. SDKAppID and SDKSecretKey is needed for running demo.
Step 3. Download the sample code
1.Go to GitHub to download the SDK and demo source code.
Open the file downloaded previously, find and open /lib/debug/GenerateTestUserSig.dart, and set the following parameters:
SDKAPPID: A placeholder by default. Set it to the actual SDKAppID.
SDKSECRETKEY: A placeholder by default. Set it to the actual key.
Note
The method for generating UserSig described in this document involves configuring SDKSECRETKEY in the 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 only suitable for the local execution and debugging of TRTC-Simple-Demo.
The best practice 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 your server for a dynamic UserSig. For more information, see How do I calculate UserSig during production?.
Step 5. Compile and run the demo
1. Execute flutter pub get.
2. Build and run the project.
Android
1. Execute flutter run.
2. Open the demo project with Android Studio (3.5 or later), and run the project.
iOS
1. Execute cd ios.
2. Execute pod install.
3. Open /ios in the source code directory with Xcode (11.0 or later). Compile and run the demo project.