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

Mini Program Update Mechanism

PDF
Focus Mode
Font Size
Last updated: 2025-11-07 18:07:53

Silent updates

After developers release a new version of a mini program in the management backend, the superapp will periodically check for updates to the locally cached mini program. However, if users have an older version of the mini program installed, they may still open the old version. In general, after a new version is released, it cannot immediately affect all live users. Typically, within 24 hours of a full release, the new version can cover over 99% of users, who will update to the latest version the next time they open the superapp.

Synchronous update on launch

The mini program will synchronously update the code package during startup in the following scenarios. Synchronous updates will block the startup process, affecting the startup time of the mini program.
If the update fails or times out, the local version will still be used to ensure the mini program remains usable.

Periodic check for version updates

The superapp runtime will periodically check if recently used mini programs have updates. If an update is found, it will be synchronously updated the next time the mini program is launched, ensuring that users can quickly access the latest version.

When users haven't used the mini program for a long time

If users have not used the mini program for an extended period, a forced synchronous check for version updates will occur to ensure the mini program is up to date. After updating to the latest version, the mini program will then open.
If users are in a weak network environment or if the download of the latest version fails, the local older version will still be launched.

Asynchronous update on launch

Even if no updates are detected before launch, the mini program will asynchronously check for updates during each cold start. If a new version is found, the code package for the new version will be downloaded asynchronously. However, the current launch will still use the locally cached older version, meaning the new version will only be used during the next cold start.

Manual update trigger by developers

In the case of asynchronous updates on launch, if developers want to trigger an immediate version update, they can use the wx.getUpdateManager API. This will prompt users to restart the mini program to update to the new version when one is available.
const updateManager = wx.getUpdateManager()

updateManager.onCheckForUpdate(function (res) {
// Callback after requesting new version information
console.log(res.hasUpdate)
})

updateManager.onUpdateReady(function () {
wx.showModal({
title: 'Update notification',
content: 'A new version is ready. Would you like to restart the application?
success(res) {
if (res.confirm) {
// The new version has been downloaded, call applyUpdate to apply the new version and restart
updateManager.applyUpdate()
}
}
})
})

updateManager.onUpdateFailed(function () {
// New version download failed
})
Debugging API: The IDE provides debugging capabilities for forced updates. By selecting Simulate update during next compilation in the compilation mode settings, you can debug the forced update feature in the IDE (this cannot be debugged on a real device).


Help and Support

Was this page helpful?

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

Feedback