All Products
Document Center

Instructions on upgrading Mini Program

Last Updated: Feb 05, 2021

When the Mini Program SDK upgrades to 10.1.60, the following changes may occur.

Changes on API

Add MPTinyHelper class, which is used to configure the information required for Mini Program API, real-device preview and debugging.

  • Set App name: Obtain the App name through the getSystemInfo API.
    1. public void setAppName(String name)
  • Set App version: Obtain the App version through the getSystemInfo API.
    1. public void setVersionName(String versionName)
  • Set the virtual domain name of mini program: The real-device debugging depends on the virtual domain name to parse requests.

    1. public void setTinyAppVHost(String vhost)

Changes on project configuration

If you access Mini Program through the mPaaS Inside or Portal & Bundle method, you should:

  • Ensure the version of is or higher.
  • In the build.gradle file of the main project module, add enableNebulaMetaInfo and useMetaInfoClass in the portal filed. For example:
    1. portal {
    2. // Due to space limitation, the existing configurations are omitted here. Do not delete the configurations in practice. Do not add the portal configuration repeatedly in the Gradle file.
    3. enableNebulaMetaInfo true
    4. useMetaInfoClass true
    5. }