All Products
Search
Document Center

Handle iOS conflict

Last Updated: Jun 17, 2021

When you access mPaaS, the mPaaS SDK may conflict with other open source libraries or third-party libraries introduced into the project, leading to project compilation failure. Based on the types of libraries that cause the conflict, two categories of solutions are available:

  • mPaaS custom libraries: If custom libraries of the mPaaS SDK conflict with other libraries in the project, you must use these custom mPaaS libraries.
  • Non-mPaaS custom libraries: If conflicting mPaaS SDK libraries are not mPaaS custom libraries, you can delete the libraries introduced by mPaaS.

Solutions to conflicting mPaaS custom libraries

If conflicting mPaaS SDK libraries are custom libraries, you must use these custom mPaaS libraries.

Open source library name mPaaS library name Conflict solution
AlipaySDK AlipaySDK The mPaaS version, which solves conflicts with modules such as mPaaS RPC and UTDID, must be used.
OpenSSL APOpenSSL The mPaaS version, which optimizes the original national secret algorithm, must be used. For more details, please refer to How to solve the OpenSSL conflict in iOS projects .
protocolBuffers APProtocolBuffers The mPaaS version must be used.

Solutions to non-mPaaS custom libraries

If conflicting mPaaS SDK libraries are not mPaaS custom libraries, you can delete the libraries introduced by mPaaS. The deletable libraries are shown in the following table. When you check whether the conflicting mPaaS SDK libraries are mPaaS custom libraries, see Remove conflicting third-party libraries to remove the conflicting libraries.

Components supported by remove_pod Open source libraries contained
mPaaS_SDWebImage SDWebImage
mPaaS_Masonry Masonry
mPaaS_MBProgressHud MBProgressHUD
mPaaS_TTTAttributedLabel TTTAttributedLabel
mPaaS_Lottie Lottie
mPaaS_AMap AMapSearchKit
AMapFoundationKit
MAMapKit
mPaaS_Security SecurityGuard
SGMain
mPaaS_APWebP WebP

Remove conflicting third-party libraries

If the conflicting mPaaS SDK library is not a mPaaS custom library, you can delete the library introduced by mPaaS.

Procedure

  1. Install the beta version of the cocoapods-mPaaS plug-in.

Note: The beta version of the cocoapods-mPaaS plug-in is supported only in the 10.1.68 baseline .

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

After the installation is completed, run the command pod mpaas version --plugin to verify that the installed version is the beta version.
1

  1. Run the pod mpaas update 10.1.68 command again to update the local baseline.
  2. Introduce remove_pod "mPaaS_xxx" to podfile and be sure to place remove_pod before a common mPaaS_pod command.
    For example, to remove SDWebImage, run this command: remove_pod “mPaaS_SDWebImage”.

       
    1. remove_pod "mPaaS_SDWebImage"
    2. mPaaS_pod "mPaaS_CommonUI"
    3. pod 'xxx' # The corresponding third-party native library
  3. After you remove the mPaaS component library, you can run the pod install command to introduce the native version.