When you integrate mPaaS, the mPaaS SDK can conflict with other open source or third-party libraries in your project. These conflicts may cause compilation to fail. This topic describes solutions for two common types of conflicts.
Solutions are divided into two categories based on the type of library that causes the conflict:
mPaaS custom libraries: If the conflict is caused by a custom mPaaS library, you must use the mPaaS library.
Non-mPaaS custom libraries: If the conflict is caused by a non-custom mPaaS library, you can remove the library that mPaaS imported.
mPaaS custom library conflict solutions
If the conflict is caused by a custom mPaaS library, you must use the mPaaS library.
Open source library name | mPaaS library name | Conflict solution |
AlipaySDK | AlipaySDK | You must use the mPaaS version. This version resolves conflicts with modules such as mPaaS RPC and UTDID. You must also integrate the mPaaS_RPC component. |
OpenSSL | APOpenSSL | You must use the mPaaS version. This version provides an optimization for the original Chinese cryptographic algorithm. For more information, see How to resolve OpenSSL third-party library conflicts in iOS projects. |
protocolBuffers | APProtocolBuffers | You must use the mPaaS version. |
Non-mPaaS custom library conflict solutions
If the conflict is caused by a non-custom mPaaS library, you can remove the library that mPaaS imported. The following table lists the libraries that you can remove. For more information, see Remove conflicting third-party libraries.
Components supported by remove_pod | Included open source libraries |
mPaaS_SDWebImage | SDWebImage |
mPaaS_Masonry | Masonry |
mPaaS_MBProgressHud | MBProgressHUD |
mPaaS_TTTAttributedLabel | TTTAttributedLabel |
mPaaS_Lottie | Lottie |
mPaaS_AMap | AMapSearchKit |
AMapFoundationKit | |
MAMapKit | |
mPaaS_Security | SecurityGuardSGMain |
mPaaS_APWebP | WebP |
Remove conflicting third-party libraries
If the conflict is caused by a non-custom mPaaS library, follow these steps to remove the library that mPaaS imported.
Procedure
Install the beta version of the cocoapods-mPaaS plug-in.
NoteThe beta version of the cocoapods-mPaaS plug-in is supported only on baseline 10.2.3.
sh <(curl -s http://mpaas-ios-test.oss-cn-hangzhou.aliyuncs.com/cocoapods/installmPaaSCocoaPodsPlugin.sh)After the installation is complete, run the
pod mpaas version --plugincommand to confirm that the plug-in is the beta version.Run the
pod mpaas update 10.2.3command to update the local baseline.Before you run the
mPaaS_podcommand, addremove_pod "mPaaS_xxx"to thePodfile. For example, addremove_pod "mPaaS_SDWebImage"beforemPaaS_pod "mPaaS_CommonUI"to removeSDWebImage.remove_pod "mPaaS_SDWebImage" mPaaS_pod "mPaaS_CommonUI" pod 'xxx' # The corresponding native third-party libraryImportantIn the preceding code, if you use the AMapSearch pod, specify the version number:
pod 'AMapSearch', '9.3.1'.After you remove the mPaaS component library, run the
pod installcommand to import the native version.