Use mPaaS Plug-in

Updated at:

mPaaS plug-in provides a GUI for quick access to mPaaS. The following features are available: adding, deleting, and upgrading mPaaS components, packaging projects, and re-signing.

Click Edit> mPaaS> Main, You can enter the mPaaS plug-in interface. as shown in the following figure.

Main

This article will describe the following functions of mPaaS plug-in in detail:

End of life announcement of mPaaS plug-in

Apple security updates introduce an extensive mechanism for verifying application signatures in macOS 10.15.1 and later versions. Due to this mechanism, the removal of signing certificates may result in unavailability of Xcode and even a response failure of the system. When Xcode 11.3.1 or later is used in macOS 10.15.3 or later, if you install the mPaaS plug-in with the signing certificate removed, the response failure probability is high. This issue is resolved when Xcode signing certificates are restored. Therefore, we will no longer update the iOS mPaaS plug-in with the signing certificate removed. In addition, related maintenance service has been unavailable since September 2020.

Import data from the cloud

Click Import Cloud Metadata, select the configuration file to be downloaded, and then click OK. The corresponding configuration is imported into the current project.

Import metadata from the cloud.png

Note

Download metadata from the cloud on the mPaaS Console > Code Management > Code Configuration page. For more information, see Create an application on the console > Download a configuration file.

Edit modules

Click Edit mPaaS Modules, select a module to be added, and then click Start Editing. The corresponding module is added to the current project.

Edit mPaaS modules

  • Cancel: indicates that the corresponding module has been added. You can click this button to remove the module from the current project.

    Note

    If the current project is based on the mPaaS framework, do not remove the mobile client framework module when you edit modules.

  • Add: indicates that the corresponding module has not been added. You can click this button to add the module to the current project.

  • COPY: All SDKs that the project depends on will be installed under the public directory on the user’s machine. And after the installation, the plug-in will maintain these dependencies automatically.

    • Cleared: The framework set under the public directory will be used. In this case, you only need to submit your codes, which can minimize the project size.

    • Selected: The frameworks of corresponding modules are copied to the MPaaS directory of the current project. You can submit these module packages at the same time.

The added modules are synchronized to the mPaaS directory of the current project. For details of the directory structure, see mPaaS directory structure.

Update the product set

Click Update mPaaS Product Set. The information and status of the product set is displayed. Click Start Update in the lower right corner. The product set, which includes all added modules, is updated to the latest version.

Update

  • Current Product Set Version: indicates the current version of the mPaaS product set that is integrated in the current project.

  • Latest Product Set Version: indicates the latest version of the mPaaS product set.

  • View Release Note of the Latest Product Set: displays the release note of the mPaaS SDK.

  • Module Name: indicates the module names involved in the latest product set.

  • Status: indicates the status of the module in the current project. The status can be Uninstalled, Latest Version Installed, or To be Upgraded.

  • Start Update: automatically updates all the modules to be updated in the product set.

After the successful update, the mpaas_sdk.config file under the directory of the current project is refreshed with the version information of the product set and all modules simultaneously.

Upgrade the baseline

Click Upgrade mPaaS Baseline, select an SDK version from the drop-down list on the right, and then click Confirm Upgrade.

Upgrade mPaaS baseline

  • Current Baseline Version: indicates the mPaaS baseline version of the current target.

  • Baseline Version for Upgrade: indicates the baseline version for upgrade.

  • Module List: contains all modules involved in the baseline version for upgrade, which includes the following information:

    • Module name: the name of the module.

    • Description: module description. You can click the info icon on the right to view the corresponding release note.

    • Status: indicates whether the corresponding module has been integrated in the project.

After the baseline upgrade is complete, all mPaaS information in the project is updated. When the baseline is upgraded from a version earlier than 10.1.32 to a version later than 10.1.32, the MPaaS directory structure and the contents in Info.plist of the project have some changes. The details are as follows.

Change of the directory structure

Among the component category directories and files under the MPaaS directory of the project, onlyAPMobileFramework and mPaas are kept after the upgrade. All the other directories, such as MPHotpatchSDK and APRemoteLogging, are automatically removed. If there are any custom files saved under these directories, you need to back up them in advance. For details of the directory structure, see mPaaS directory structure.

Change of Info.plist

The following figure shows the related mPaaS fields inserted in the Info.plist file of the project before the upgrade.

plistbefore

In 10.1.32 and later versions, only the Product Version field is required. After the baseline is upgraded, the plug-in automatically removes the Product ID, mPaaS, and mPaaSInternal fields. If the plug-in fails to remove these fields, you need to delete them manually. The following figure shows the fields after the upgrade.

Note

Do not delete the Product Version field when you delete the fields manually.

plistafter

Generate HotPatch resource bundle

To ensure the security of the hotpatch feature, the locally-verified .js script file must be packaged and encrypted before it is submitted to the platform.

Click Generate Hotpatch Resource Bundle. Upload the locally-verified .js script and the RSA private key file to generate an encrypted Hotpatch resource bundle. The parameter descriptions are as follows:

  • Script file: After the local test is verified, .js the script.

  • Private key: a private key file obtained by openssl. This private key file pairs with the public key file added to the project.

  • Hotpatch Key: appKey. This key is read from the configuration file on the cloud. There is no need to modify the key.

  • AppSecret: App Secret corresponding to the application. You can click the help icon on the right to view more information.

hotpatch

The generated hotpatch resource bundle and the uploaded .js script file are saved in the same directory. This directory contains the contents:

  • Test.js: the encrypted file uploaded to the release platform.

  • Test.sig: the encrypted signature file.

  • Test.zip: the encrypted script file that is used to verify the encryption algorithm before the script file is uploaded to the release platform.

Resource bundle

Pack mPaaS

The mPaaS plug-in supports packaging with one click. After you enter a bundle ID, bundle version, and signature parameters, the plug-in generates a .ipa installation package. The mPaaS Release management is used for upgrading the app and prompting users to install the new version.

Packaging

  • Bundle Identifier: bundle identifier of the current project. It must be consistent with the bundleId field in the cloud metadata when the mobile gateway service is enabled. Otherwise, the mobile gateway will fail to verify the signature.

  • Bundle Version: version number of the current project. It is generally consistent with the bundle version in the Info.plist file of the project.

  • CodeSign Identity: identity of the signing certificate. You only need to find the common name of a certificate for importing the certificate to Keychain. This certificate is used for signing the current project.

  • Provisioning Profile: provision configuration profile that matches Bundle Identifier and the signing certificate.

  • Debug: indicates whether to use the debug configuration information. true indicates that the debug configuration information is used. false indicates that the release configuration information is used.

  • App Store: indicates whether the installation package is generated for App Store. true indicates that the installation package is generated for App Store and a signing certificate is required for packaging. false indicates that the installation package is not generated for App Store and a development certificate can be used for packaging.

The generated .ipa package is saved in the Product directory of the current project.

Re-sign

The mPaaS plug-in supports re-signing the original .ipa installation package. A re-signed .ipa installation package can be generated and installed on more devices. This facilitates testing and verification.

  • ipa Installation Package: the existing ipa installation package.

  • Certificate Name: name of the new certificate. You can run security find-identity -p codesigning -v ~/Library/Keychains/login.keychain to view the certificate name.

  • Certificate ID: ID of the new certificate. You can view User ID of the corresponding certificate in Keychain.

  • Provision File: provision configuration file that matches the new certificate.

Click OK. Then select a path for saving the re-signed .ipa installation package. This new installation package can be installed and used directly on a real device.

Re-sign

Generate security guard picture

The mPaaS plug-in supports generating a security guard picture in offline mode. After you enter the required information such as bundle ID and AppSecret, the plug-in can generate the picture yw_1222.jpg that is needed for RPC signature verification and offline package decryption.

Image

  • Bundle Identifier: bundle identifier of the current project.

  • AppID: App ID of the current project. It is consistent with the appId field in the meta.config file of the project.

  • WorkspaceID: workspace ID of the current project. It is consistent with the workspaceId field in the meta.config file of the project.

  • AppSecret: a private key for security guard verification. Public cloud users can query in the mPaaS console. For private cloud users, please consult with the server developer. You can click the help icon on the right to view more information.

  • jpgVersion: version number of the security guard picture yw_1222.jpg. This version number depends on the version of the client SecurityGuardSDK.framework:

    • If the version of the client SecurityGuardSDK.framework is earlier than 5.3.85, the version number of yw_1222.jpg is 4.

    • If the version of the client SecurityGuardSDK.framework is 5.3.85 or later, the version number of yw_1222.jpg is 5.

      10

  • OutPath: the path where the yw_1222.jpg picture will be saved.

  • Image type: The type can be selected. Standard and account pass the default value is standard. If Zhanghutong is selected, the plug-in generates a specific picture for the Mini Program Zhanghutong.

Note

  • If you have imported the meta.config file as a public cloud user, this picture is available in the meta.config file. There is no need to regenerate a picture unless specially required.

  • If you are an Apsara Stack user, use the preceding method to generate the yw_1222.jpg picture and add it to the project.

View mPaaS plug-in version

  • In version 5.0.5, the mPaaS plug-in provides the update checking feature. You can choose Edit > mPaaS > About to view the current version of the mPaaS plug-in.

    About menu of mPaaS plug-in

    The version information is as follows:

  • If you cannot find the About menu in your mPaaS plug-in, the version of your mPaaS plug-in is earlier than 5.0.5. You can run the following command on the terminal to get the exact version number of your mPaaS plug-in.

    mpaas --version