Configure H5 offline packages

更新时间:
复制 MD 格式

The real-time publishing platform lets you upload, publish, and quickly push offline packages to clients. For more information about offline packages, see Introduction to offline packages.

Before adding an offline package, you must configure it.

Procedure

Log on to the mPaaS console and follow these steps:

  1. In the navigation pane on the left, click Real-time Release > Offline Package Management.

  2. On the offline package list page, click Configuration Management.

  3. In the Domain Name Management section, enter a virtual domain name, such as h5app.com. When a client loads a local offline package file, this virtual domain name is appended to the file name as a suffix. This standardizes local file paths.

    Important

    The virtual domain name must be a domain name that you have registered. It cannot be a second-level or third-level domain name or start with http or https.

  4. Select I confirm that the preceding information is correct and cannot be modified after submission, and then click Save.

  5. In the Key Management section, upload a key file. This file must be an RSA private key generated with OpenSSL. The key is used to sign the offline package. The client uses the corresponding public key to verify the signature. Generate the private and public key files as follows:

     Generate a private key:
       openssl genrsa -out private_key.pem 2048
     Generate a public key:
       openssl rsa -in private_key.pem -outform PEM -pubout -out public.pem
    Note

    You do not need to upload a key file if signature verification is disabled on the client.

  6. Select I confirm that the preceding information is correct and cannot be modified after submission, and then click Upload to complete the offline package configuration.

What to do next

Generate an offline package