Create a miniapp package
You must create a miniapp package in the mPaaS console before you can publish the miniapp or perform other operations. When you create a miniapp package resource, you must provide basic and configuration information.
Prerequisites
You have configured the miniapp package on the configuration management page. For more information, see Configure a miniapp package.
Procedure
Log on to the mPaaS console and perform the following steps:
In the navigation pane on the left, choose Mini Program > Mini Program Release.
On the Official Mini Program Package Management tab, click Create to the right of the Mini Program Package List.
NoteThe test package management feature is for internal testing and validation of test packages before the official release.
The official package management feature is for releasing official packages after they pass internal tests.
In the Create Mini Program window, enter the miniapp ID and miniapp name, and then click OK.
NoteThe miniapp ID must be a 16-digit number. We recommend that you do not use a number that starts with 666 or 20000.
After you create a miniapp, it appears on both the Official Mini Program Package Management and Test Mini Program Package Management tabs. You can add an official package or a test package for the miniapp on the corresponding tab. The procedure is the same for both.
In the miniapp list, find the new miniapp and click Add.
In the Basic Information section, complete the following configurations:
Version: Enter the version number of the miniapp package, such as
1.0.0.1.Client Scope: Select the minimum and maximum versions of the iOS and/or Android clients that the miniapp supports.
NoteYou must select at least one client type.
Icon: Click Select File to upload an icon for the miniapp package. The image must be in PNG, JPEG, or JPG format. The recommended image size is 180 × 180 pixels, with the core graphic within a 160 px white area.
NoteWhen you create a miniapp package for the first time, you must upload an icon for the miniapp. When you release later versions of the package, the icon from the previous version is used by default if you do not upload a new one.
Package Type: Select the type of the uploaded miniapp package.
On the Test Mini Program Package Management tab, you can select Real Device Test Package or Real Device Preview Package.
NoteBoth real device test packages and real device preview packages are test versions uploaded through an Integrated Development Environment (IDE). You can access them only by scanning the QR code generated by the IDE.
Real device test packages support remote debugging in the miniapp IDE. Real device preview packages do not support remote debugging.
On the Official Mini Program Package Management tab, you can select Feature Package or Plugin Package.
NoteThere is currently no functional difference between feature packages and plugin packages.
File: Upload the miniapp package resource file. The file format must be
.zip.NoteExport the miniapp package from the miniapp IDE. Decompress the package and then compress it again into a
.zipresource file.
In the Configuration Information section, complete the following configurations:
Main Entry URL: Required. The home page of the miniapp package, such as
/index.html#pages/index/index.NoteObtain the home page address from the first item in the
pagearray of the global configuration fileapp.json. For more information aboutapp.json, see Application.Show bottom navigation bar: Specifies whether to display a navigation bar at the bottom of the miniapp. By default, this configuration item cannot be modified. After you upload the miniapp package, the frontend page parses the package and checks for a
tabconfigfile. The option is automatically set to "Yes" if the file exists, and "No" otherwise.Show options menu in the upper-right corner: Select whether to display an options menu in the upper-right corner of the miniapp.
Virtual Domain Name: Automatically displays the virtual domain name that you entered when you configured the miniapp package.
Extension Information: Optional. Enter page loading parameters in key-value (KV) format. Separate multiple KV pairs with commas (,).
NotemPaaS lets you configure the request interval for miniapp packages. You can configure it for a single package or globally.
Single configuration: This applies only to the current miniapp package. In the Extension Information field, enter
{"asyncReqRate":"1800"}to set the request interval. In this example,1800is the interval in seconds. The value can range from 0 to 86400 seconds (0 to 24 hours). A value of 0 means there is no request interval limit.Global configuration: You must configure this in the client code. For more information, see Integrate with Android and Integrate with iOS.
Download Timing: Select when the miniapp package is downloaded.
If you select Wi-Fi only, the miniapp package is automatically downloaded in the background when the device is connected to a Wi-Fi network.
If you select Download on all networks, the package is automatically downloaded on any network, including mobile data networks. Use this option with caution as it may consume the user's mobile data.
Installation Timing: Select when the miniapp package is installed.
If you select Do not preload, the package is installed only when the user opens the miniapp.
If you select Preload, the package is automatically installed after it is downloaded.
Select I confirm that the preceding information is accurate and cannot be modified after submission.
Click Submit.