tencent cloud

All product documents
Tencent Cloud Super App as a Service
Update Mechanism
Last updated: 2025-02-24 17:10:37
Update Mechanism
Last updated: 2025-02-24 17:10:37

Silent updates

When a developer releases a new version of a mini game through the management console, users who have an older version of the game locally may still open the old version. The host app will periodically check if there is an updated version of the locally cached mini game and, if so, will silently update to the new version. In general, after a developer releases a new version, it may not immediately affect all users, but in the worst case, the new version information will be delivered to users within 24 hours. The next time the user opens the game, it will first update to the latest version before launching.

Update before launch

The host app will periodically check if recently used mini games have a new version available. If there is a new version, it will update to the new version the next time the game is opened. This ensures that all mini games will use the latest version within 24 hours of the new version being released.

Update during launch

Every time a mini game cold starts, it will check for updates. If a new version is found, the new version's code package will be downloaded asynchronously while the game starts using the local package. The new version of the mini game will be applied the next time the game cold starts.

Forced updates

If you need users to immediately apply the latest version, you can use the following method:

Check and update the API

You can use the wx.getUpdateManager to handle updates.
const updateManager = wx.getUpdateManager();

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

updateManager.onUpdateReady(function() {
wx.showModal({
title: "Update available",
content: "A new version is ready. Would you like to restart the app?",
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() {
// Callback for failed new version download
...
Debug API: The developer tools provide the ability to force update for debugging purposes. By enabling "Simulate update on next compile" in the compile mode settings, you can test the forced update feature in the developer tools (this cannot be tested on a real device).




Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon