# Resource Package Management

# Note

  • This feature requires the use of the latest nightly Developer Tools
  • The feature relies on the latest SDK ( Android need 0.9.0 versioniOS need 0.9.6 Version)
  • Using this feature requires re-upgrading the multi-terminal project

# Update Rules for Online Version

The client has installed the offline installation package, will it automatically update to the online version? Its rules are as follows:

  • In reverse order from the release time of the online version, return the first one that satisfies theMinimum app version + Minimum sdk versionThe Resource Pack version of
  • So when you set up the online version, finally set the minimum app version Minimum sdk Version and other information, if you do not fill in, it is equivalent to the online version will be matched by all apps, and then covered. Therefore, it is recommended that developers set the relevant minimum each time they release the online version. app Version and Minimum sdk Version information
  • In addition, resource package management can only publishMini Program code, updates involving native capabilities and the SDK are not supported
  • Added: If installed on the phone's IPA or APK Is the development version, then it will not be updated to the new version of the resource packThis means that the resource pack update policy applies only to the official version of the IPA or APK Installation package

# Overall steps

Multi-application resource pack version management function, the overall steps are as follows:

# 1. Upload resource package in developer tools

  • Details can be viewed[Upload Resource Pack](https://dev.weixin.qq.com/docs/framework/Guideline/devtools/pkg-mgnt .html)

# 2, enter the resource package management console

  • log in Donut Development platform, EnterMultiterminal applicationControl, re-entry.Multiple Application Details - Resource Package Management

# 3. WillDevelopment versionSet toBeta

  • When setting up a beta, you can add a test whitelistWhitelist users can get the beta code to update
  • On the white list. userid Of the use, see the following description

# 4. WillDevelopment versionorBetaSet toOnline version

  • It is possible to directlyDevelopment versionSet toOnline version, can also be placedBetaSet toOnline version
  • Set to online version, all users can get the online version of the code to update

# adopt JSAPI Set up userId

  • Interface Name: wx.miniapagesetSaaAUserId
  • Examples of use:
wx.miniapp.setSaaAUserId ({
  userId: 'userId of the user ',// Developers can customize
})

# Note:

  • userId Is used in the developer business to uniquely identify the user id
  • When the user is logged in, it is recommended that the Mini Program code wx.miniapp.setSaaAUserId Set up userId
  • After the user is logged out, you can log in by calling the wx.miniapp.setSaaAUserId ({userId: ''}) Eliminate
  • Called wx.miniapp.setSaaAUserId After that, restart. App Thereafter, it remains in effect.