tencent cloud

Tencent Cloud Super App as a Service

Release Notes and Announcements
Announcement: Tencent Cloud Mini Program Platform Renamed to Tencent Cloud Super App as a Service on January 2, 2025
Console Updates
Android SDK Updates
iOS SDK Updates
Flutter SDK Updates
IDE Updates
Base Library Updates
Product Introduction
Overview
Strengths
Use Cases
Purchase Guide
Billing Overview
Pay-As-You-Go Billing
Renewal Guide
Service Suspension Instructions
Getting Started
Plan Management
Overview
Console Account Management
Storage Configuration
Acceleration Configuration
Branding Configurations
Platform Features
Console Login
Users and Permission System
Mini Program Management
Mini Game Management
Superapp Management
Commercialization
Platform Management
User Management
Team Management
Operations Management
Security Center
Code Integration Guide
Getting Demo and SDK
Android
iOS
Flutter
Superapp Server
GUID Generation Rules
Mini Program Development Guide
Mini Program Introduction and Development Environment
Mini Program Code Composition
Guide
Framework
Components
API
Server Backend
JS SDK
Base Library
IDE Operation Instructions
Mini Game Development Guide
Guide
API
Server Backend
Practice Tutorial
Mini Program Login Practical Tutorial
Mini Program Subscription Message Practical Tutorial
Payment Practical Tutorial
Ad Integration Practical Tutorial
Mini Game Subscription Message Practical Tutorial
API Documentation
History
Introduction
API Category
Making API Requests
Operation Management APIs
User Management APIs
Team Management APIs
Sensitive API-Related APIs
Role Management APIs
Platform Management APIs
Other Console APIs
Mini Program or Mini Game APIs
Management-Sensitive APIs
Global Domain Management APIs
Superapp APIs
Data Types
Agreements
Service Level Agreement
Data Processing and Security Agreement
SDK Privacy Policy Module
SDK Data Processing and Security Agreement Module

SDK Quick Integration

PDF
Focus Mode
Font Size
Last updated: 2025-12-25 19:16:33
Example for integration

Prerequisites

Environment requirements

sdk: '>=3.0.0 <4.0.0'
flutter: '>=3.3.0'

Plugin dependencies

plugin_platform_interface
flutter_plugin_android_lifecycle

Integration method

Add the core plugin from pub.dev

1. To add dependencies, you first need to add the plugin from pub.dev. Open the pubspec.yaml file in the app folder and add tcmpp_flutter: ${version}.

2. Install dependencies
From the terminal: Run flutter pub get.
From VS Code: Click Get Packages located in right side of the action ribbon at the top of pubspec.yaml indicated by the Download icon.
From Android Studio/IntelliJ: Click Pub get in the action ribbon at the top of pubspec.yaml.

Obtain the configuration file

1. To initialize the mini program SDK, first obtain the SDK configuration file from the mini program console. Log in to the console, and click Create superapp.



2. Fill in the superapp information.



Required information:
Superapp name: Supports 3-64 characters including a-z, A-Z, 0-9, spaces and some special symbols ("+", "=", ",", ".", "@", "-", "_").
Optional information:
Superapp description: Brief introduction of the superapp, primarily for internal reference.
Superapp icon: Supports uploading square images in .jpg or .png format, with a resolution of 128 × 128 and a file size under 2 MB. If the icon is not uploaded, the system default icon will be used.
Scheme: Only supports lowercase letters and numbers, up to 64 characters. Once the scheme is configured, the QR code of the mini program (or mini game) will include this scheme. Using the phone system’s built-in scanning function, users can directly launch superapp and open the mini program (or mini game).
3. Add Package name.



The following fields need to be filled in when adding the package name/bundle ID:
Type: Once selected, the type cannot be changed. Package names for non-production types are only used for superapp test versions and have a monthly device usage limit (up to 500 devices).
Package name/bundle ID: Only supports lowercase letters (a-z), numbers (0-9), dots (.), and hyphens (-), up to 255 characters. It is recommended to use reverse domain name notation, such as com.example.myapp.
Download URL: Only supports uppercase letters (A-Z), lowercase letters (a-z), numbers (0-9), dots (.), hyphens (-), and slashes (/), up to 2,048 characters.



4. Download the configuration file.



Note:
The default name of the downloaded configuration file is tcsas-android-configurations.json.

Add the configuration file

1. Place the configuration file in the Flutter project.
2. Add a file named tcsas-plugin-settings.json in the root directory of the project.
3. Edit the pubspec.yaml file to include the above files as a Flutter resource.
In the tcsas-plugin-settings.json file, you can configure the SDK settings as needed.
Android:
Field
Type
Description
configAssetsName
string
Path to the configuration file in Android
debug
bool
Enable SDK debugging and logging
iOS:
Field
Type
Description
configAssetsName
string
Path to the configuration file in iOS
debug
bool
Enable SDK debugging
logEnable
bool
Enable SDK logging
inspectableEnabled
bool
Enable inspectable feature for iOS 16.4 and later, allowing mini program debugging via Safari

General:
Field
Type
Description
appName
string
Host app name, mainly for copyright notices in the mini programs
appVersion
string
Host app version, mainly for copyright notices in the mini programs
assetPathOfPresets
string
Directory for preloaded offline mini programs, requires a relative path under Flutter assets
Example:
{
"android": {
"configAssetsName": "tcsas-android-configurations.json",
"debug": true
},
"ios": {
"configAssetsName": "tcsas-ios-configurations.json",
"debug": true,
"logEnable": true,
"inspectableEnabled": true
},
"common":{
"appName": "tcmpp-flutter",
"appVersion": "1.0.0",
"assetPathOfPresets": "res/offline"
}
}
In Android, go to android > app > build.gradle in your Flutter project, and the applicationId can be found in android > defaultConfig.

In iOS, go to ios > Runner.xcodeproj > project.pbxproj in your Flutter project, and search for PRODUCT_BUNDLE_IDENTIFIER.


Platform-specific

For Android

1. Navigate to the android > app directory and open the build.gradle file for editing.
2. In the android > defaultConfig section, set the minSdkVersion to at least 21.

minSdkVersion 21
3. In the android > defaultConfig section, add packagingOptions.

packagingOptions {
pickFirst 'lib/arm64-v8a/libc++_shared.so'
pickFirst 'lib/armeabi/libc++_shared.so'
pickFirst 'lib/armeabi-v7a/libc++_shared.so'
pickFirst 'lib/arm64-v8a/libmarsxlog.so'
pickFirst 'lib/armeabi/libmarsxlog.so'
pickFirst 'lib/armeabi-v7a/libmarsxlog.so'
pickFirst 'lib/arm64-v8a/libv8jni.so'
}

For iOS

Add the source code

Add the source code in the Podfile located in the ios directory.
source 'https://github.com/TCMPP-Team/tcmpp-repo.git'
source 'https://github.com/CocoaPods/Specs.git'

Install pods

Change directory to the ios and execute pod install.
pod install



Open a mini program

Import 'package:tcmpp_flutter/tcmpp_flutter.dart' using the API.

Create a TcmppFlutter object and use it to call the API to open a mini program:





Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback