Last updated: 2021-05-20 19:54:56
This document describes how to quickly run the TRTC demo for Flutter.
- Flutter 2.0 or above
- Developing for Android:
- Android Studio 3.5 or above
- Devices with Android 4.1 or above
- Developing for iOS:
- Xcode 11.0 or above
- Your project has a valid developer signature.
You have signed up for a Tencent Cloud account and completed identity verification.
Step 1. Create an application.
- Log in to the TRTC console and select Development Assistance > Demo Quick Run.
- Enter an application name, e.g.
TestTRTC, and click Create.
Step 2. Download the SDK and demo source code.
- Download the SDK and demo source code for your platform.
- Click Next step.
Step 3. Configure demo project files.
- In the Modify Configuration step, select the platform in line with the source package downloaded.
- Find and open
- Set parameters in
GenerateTestUserSig.dart as follows.
- SDKAPPID: `PLACEHOLDER` by default. Set it to the actual `SDKAppID`.
- SECRETKEY: `PLACEHOLDER` by default. Set it to the actual key.
- Click Next step to complete the creation.
- After compilation, click Return to Overview Page.
- 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 leaked, attackers can steal your Tencent Cloud traffic. Therefore, this method is only suitable 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, see How do I calculate UserSig on the server?.
Step 4. Compile and run the project.
flutter pub get.
- Compile, run, and debug the project.
- Open the demo project with Android Studio (3.5 or above).
- Run the project.
\ios project in the source code directory with Xcode (11.0 or above).
- Compile and run the demo project.