All Products
Search
Document Center

Upgrade guide of mPaaS 10.1.68

Last Updated: Jun 01, 2021

mPaaS 10.1.68 release notes

  1. Starting from the 10.1.68 baseline, UIWebView has been officially discarded, and only WKWebView is supported. For details, see mPaaS is adapted to WKWebView. App Store will no longer accept new apps that use UIWebView from April 2020, and will no longer accept updates to apps that use UIWebview from December 2020. For details, see Apple’s official announcement . Upgrade to the 10.1.68 baseline as soon as possible to adapt to WKWebView.

  1. Xcode 11 is supported to build static library packages and is fully compatible with Xcode 11 development.

mPaaS 10.1.68 upgrade instructions

Use CocoaPods for upgrade

Prerequisites

The CocoaPods mPaaS plug-in has been installed.

  • If you have not installed the CocoaPods mPaaS plug-in, execute the following script on the terminal to install the plug-in.

       
    1. sh <(curl -s http://mpaas-ios.oss-cn-hangzhou.aliyuncs.com/cocoapods/installmPaaSCocoaPodsPlugin.sh)
  • If you have installed the CocoaPods mPaaS plug-in, directly run the upgrade command pod mpaas update --all to upgrade the plug-in. For details about using the CocoaPods mPaaS plug-in, see Use CocoaPods for access based on the native framework.

Procedure

  1. Change the SDK version to 10.1.68 in Podfile.
    2
  2. Run the command pod mpaas update 10.1.68 to install the latest SDK of version 10.1.68 for the baseline.

  3. Run the pod install or pod update command as needed to upgrade the SDK to version 10.1.68 in the project.

Follow-up steps

If you encounter the following error when accessing CocoaPods:

 
  1. Invalid `Podfile` file: [!] No mPaaS_Nebula : 10.1.68 found !!! Check name & version in Podfile.

Try this solution:

  1. Run the command gem list | grep 'mPaaS' to view the CocoaPods plug-in version, as shown in the following figure.
    CocoaPods troubleshooting

  2. If the CocoaPods plug-in version is earlier than 0.9.5, execute the following script to reinstall the plug-in.

 
  1. sh <(curl -s http://mpaas-ios.oss-cn-hangzhou.aliyuncs.com/cocoapods/installmPaaSCocoaPodsPlugin.sh)

Component usage and upgrade instructions

If your current baseline version is earlier than 10.1.60 and integrates the HTML5 container, mini program, and hotfix components, read the following instructions in detail.

Component API changes

Starting from the 10.1.32 baseline, the mPaaS component adds an adaptation layer. If your baseline is not using adaptation-layer APIs, read mPaaS 10.1.32 is adapted to iOS 13 first.

We recommend that you use the APIs of the adaptation layer after upgrading the SDK. For details, see the following upgrade instructions for different components:

Notes:
  • Pay special attention to the directory and info.plist configuration changes for mPaaS components in the project.
  • We strongly recommend that you modify the code and use middle-layer (adapter) methods instead of directly using underlying methods, because certain underlying methods may be modified or discarded in future versions. You may need to take lots of time adapting them in future updates if you continue to use them.

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

Handle custom libraries

The components of the 10.1.68 baseline incorporate customization requirements, However, if your included custom libraries in your dependencies and upgraded the SDK from an earlier version (such as 10.1.32) to version 10.1.68, you may need to customize the custom libraries again based on the new version for security reasons. To do this, submit a ticket or contact mPaaS technical support personnel for consultation.

The sharing component

Third-party SDKs in the sharing component of version 10.1.68 has been upgraded, including the WeChat, Weibo, and QQ connection SDKs. Since the sharing of WeChat and QQ added the Universal Link feature in the latest version, be sure to adapt to the new SDKs, including:

  1. The application configuration information of the corresponding platform, which can be viewed in app management (under the third-party developer account), is updated. For the specific adaptation method, visit the reference link.
  2. For WeChat sharing, the “universalLink” field must be added to the configuration information of the mPaaS sharing component. The value of this field is the actual Universal Link address.