Welcome to “Algorithms and the Beauty of Programming” ↑ pay attention to us!

This article was first published on the wechat official account “Beauty of Algorithms and Programming”. Please follow us and learn more about this series of articles in time.

1 Problem Description

Now that we know how to use Hbuilder to create HTML5APP projects and how to debug APP pages, we need to consider how to package HTML5APP projects.

Since HTML5 apps are developed in a different environment than they are packaged in, and the emphasis is on handling IOS and Android separately, local deployment can be time-consuming and difficult to package successfully. Is there an easy way to do APP packaging? The answer is to do it in the cloud, without deploying a packaging environment or making changes to HTML5 code.

2 Implementation Method

1. Start by setting the effects and styles you want in your APP project’s manifest.json, such as the icon, APP name, description, entry page, etc. Then configure the module permissions needed in the program, according to the need to configure, otherwise it will be too large too redundant. As follows:

(1) Select the manifest.json file, then double-click to open it, and set the version and start the image Settings.

(2) Set the APP icon for ios and Android. All images must be in PNG format and must conform to strict resolution requirements. Renaming to PNG using another image format will cause packaging to fail. When configuring ICONS, select automatically generate all applicable ICONS, select a large icon and click Generate and Replace.

2. After configuring the manifest.json file, click Publish > Cloud Package > Native installation package on the menu bar.

3. Choose on demand, which version you want to release, usually for both IOS and Android.

(1) IOS packaging, supporting two ways: a. Developer certificate is required for packaging. After the APP is packaged, it can be installed and run on the phone that has set the UUID; B. Jailbreak package can only be installed and run on jailbreak vegetable phone.

(2) Android packaging, also support two ways: a, using Dcloud public certificate; B. Use its own certificate. No matter which certificate is used, the APP installation package printed out can be installed and run directly on the desktop phone.

Certificate generation please readers baidu or Google it.

(Note: APPID needs to be the same as the profile file, otherwise packaging errors will be reported)

3 summary

The whole process of MUI cloud packaging APP is almost like this. According to different needs of the project, readers can choose SDK configuration by themselves. To achieve the function, they need to obtain relevant configuration parameters from third-party platforms, such as wechat login, appID and appSecret, appID: AppID value of applications on wechat open platform; AppSecret: appSecret value of applications on wechat open platform.

More interesting articles:


Tips: Click on the lower right corner of the page “Write a message” to comment, looking forward to your participation! Looking forward to your forwarding!