UpdateManager.onCheckForUpdate(function listener)

View Markdown

Mini Program Plugins: Not supported

Feature Description

Listens for the event triggered when requesting the update check result from the WeChat backend. WeChat automatically checks for updates every time it starts (including hot starts) in Mini Program, without requiring developers to trigger this process manually.

Parameters

function listener

A listener function that requests the WeChat backend to check the update result event.

Parameters

Object res
Attribute Type Description
hasUpdate boolean Whether a new version is available

Example Code

Example Code