This document describes how to quickly run the demo for the TRTC Flutter SDK.
Currently, screen sharing and device selection are not supported on Windows or macOS.
Flutter 2.0 or later
Developing for Android:
Android Studio 3.5 or later
Devices with Android 4.1 or later
Developing for iOS and macOS:
Xcode 11.0 or later
OS X 10.11 or later
A valid developer signature for your project
Developing for Windows:
OS: Windows 7 SP1 or later (64-bit based on x86-64)
Disk space: At least 1.64 GB of space after the IDE and relevant tools are installed
Step 1. Create an application
1. In the TRTC console, click Development Assistance > Demo Quick Run.
2. Select New and enter an application name such as
TestTRTC. If you have already created an application, select Existing.
3. Add or edit tags according to your needs and click Create.
An application name can contain up to 15 characters. Only digits, letters, Chinese characters, and underscores are allowed.
Tags are used to identify and organize your Tencent Cloud resources. For example, an enterprise may have multiple business units, each of which has one or more TRTC applications. In this case, the enterprise can tag TRTC applications to mark out the unit information. Tags are optional and can be added or edited according to your actual business needs.
Step 2. Download the SDK and demo source code
1. Download the SDK and demo source code for the platform you are developing for.
Step 3. Configure the demo project file
1. In the Modify Configuration step, select your platform.
2. Find and open the
3. Set parameters in
GenerateTestUserSig.dart as follows.
SDKAPPID: A placeholder by default. Set it to the actual `SDKAppID`.
`SECRETKEY`: A placeholder by default. Set it to the actual secret key.
4. Click Next to complete the creation.
5. After compilation, click Return to Overview Page.
In this document, the method to obtain
UserSig is to configure the secret key in the client code. In this method, the secret key is vulnerable to decompilation and reverse engineering. Once your secret key is leaked, attackers can steal your Tencent Cloud traffic. Therefore, this method is only suitable for locally running a demo project and debugging.
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 4. Compile and run the demo
2. Compile, run, and test the project.
2. Open the demo project with Android Studio (3.5 or later), and click Run.
1. Go to the iOS directory and run
/ios in the source code directory with Xcode (11.0 or later). Compile and run the demo project.
flutter config --enable-windows-desktop.
flutter run -d windows.
flutter config --enable-macos-desktop.
2. Go to the
macos directory and run
flutter run -d macos.
How do I view TRTC logs?
TRTC logs are compressed and encrypted by default with the
.xlog extension. You can view them via the following paths:
Documents/log of the application sandbox
6.7 and earlier:
6.8 and later:
What should I do if videos show on Android but not on iOS?
Make sure that in
info.plist of your project, the value of
What should I do if the "Manifest merge failed" error occurs in Android Studio?