This section describes how to generate configurations based on the native plug-in extension mechanism of CocoaPods to quickly access mPaaS.
- CocoaPods 1.0.0 or a later version has been installed. The project to be connected is the CocoaPods project.
The CocoaPods mPaaS plug-in has been installed. If the plug-in has not been installed, run the following command to install it.
sh <(curl -s http://mpaas-ios.oss-cn-hangzhou.aliyuncs.com/cocoapods/installmPaaSCocoaPodsPlugin.sh)
An application has been created in the console, and the
.configconfiguration file has been downloaded. For more information, see Create an application in the console.
.configconfiguration file to the root directory (at the same level with
Podfile) of the project.
Note: Please ensure the
.configfile’s filename is ending with iOS. If it is ending with ios, it needs to be updated to iOS manually.
pod mpaas initcommand to automatically process the
Podfilefile and add
The code for automatic configuration is as follows:
Note: You need to replace “x.x.x” in the code with the actual baseline version.
mPaaS_baselineto specify the mPaaS baseline.
For example, in
10.1.32is the baseline version. For version differences, see Release Note.
mPaaS_podto add mPaaS component dependencies.
For example, in
mPaaS_Nebulais a component name. The following table shows more component names.
Component Configuration Applicable Baseline Description mPaaS_pod "mPaaS_LocalLog" 10.1.32+ Local log. mPaaS_pod "mPaaS_Log" 10.1.32+ Mobile analysis: behavior log, automation log, Crash log, and performance log analysis. mPaaS_pod "mPaaS_Diagnosis" 10.1.32+ Diagnosis: Client diagnosis and analysis. mPaaS_pod "mPaaS_RPC" 10.1.32+ Mobile gateway: provides download, upload, RPC call and other functions. mPaaS_pod "mPaaS_Sync" 10.1.32+ Mobile synchronization: long connection service. mPaaS_pod "mPaaS_Push" 10.1.32+ Message push. mPaaS_pod "mPaaS_Config" 10.1.32+ Switch configuration: pull the corresponding value from the server based on the key to dynamically control the client logic. mPaaS_pod "mPaaS_Hotpatch" 10.1.32+ Hotpatch: used to fix online bugs without releasing a new version. mPaaS_pod "mPaaS_Upgrade" 10.1.32+ Upgrade release: provides convenient service to proactively detect and upgrade, which can be used for daily phased release and online new version update reminder. mPaaS_pod "mPaaS_Share" 10.1.32+ Sharing: supports sharing text and pictures to well-known channels such as Weibo, DingTalk, and Alipay friends. mPaaS_pod "mPaaS_Nebula" 10.1.32+ H5 container and offline package: Nebula container, which supports interaction between the front end and the native. mPaaS_pod "mPaaS_UTDID" 10.1.32+ Device ID: easily and quickly obtained for the application to find a specific device safely and effectively. mPaaS_pod "mPaaS_DataCenter" 10.1.32+ Unified storage: provides secure, fast, encryptable KV storage that supports multiple data types. The database DAO supports multiple solutions for persistent data storage. mPaaS_pod "mPaaS_ScanCode" 10.1.32+ Code scan: quickly identifies QR codes and barcodes. mPaaS_pod "mPaaS_LBS" 10.1.32+ Mobile positioning: positioning solution for mobile clients. mPaaS_pod "mPaaS_CommonUI" 10.1.32+ Universal UI: universal UI component library that provides various UI components. mPaaS_pod "mPaaS_BadgeService" 10.1.32+ Badge: badge reminder component of the client, which supports reminder styles such as badge, number, and New. It can automatically manage the badge relationship of a tree structure. mPaaS_pod "mPaaS_AlipaySDK" 10.1.32+ Quick Pay function of Alipay: quick payment platform of Alipay. mPaaS_pod "mPaaS_Multimedia" 10.1.32+ Multimedia component: supports image download, upload, cache and other functions. mPaaS_pod "mPaaS_MobileFramework" 10.1.32+ Mobile framework: client application framework, sub-app management, multi-tab application management, third-party redirection management, viewController redirection, and exception handling and reporting. mPaaS_pod "mPaaS_OpenSSL" 10.1.32+ OpenSSL mPaaS_pod "mPaaS_TinyApp" 10.1.32+ Applets: integrates lease capabilities. mPaaS_pod "MPBaseTest" 10.1.32+ Basic test: basic test module. mPaaS_pod "mPaaS_CDP" 10.1.32+ Intelligent delivery: configure various intelligent advertisements and presentations to the clients with dynamic launches. mPaaS_pod "mPaaS_AliAccount" 10.1.60+ Mini program: publish the mini program mPaaS_pod "mPaaS_ARTVC" 10.1.68 Voice call and video call: Voice call and video call components. This feature supports two-party video calls, group video calls and online conferences.
See the following example of complete Podfile:
pod installto complete access. You can also add
--verboseto view log details.Note: If you are prompted when you execute
pod installthat you cannot find the library imported from GitHub’s official website, specify the source address for the official GitHub Source in podfile:
If you find the third-party library conflicts after accessing, you can remove the specific third-party library. For the specific operation, see iOS conflict processing.
When the new version of mPaaS published, you can select the upgrading components, or the general upgrading baseline (namely SDK version).
- When you execute
pod mpaas update x.x.xin the command line,
x.x.xis the baseline version number currently in use, such as
pod installto complete upgrading for the corresponding components under this baseline.
podfile, modify the corresponding baseline number of
mPaaS_baselineto complete upgrading for the general baseline. For example, you can modify the baseline number from
10.1.60. The baseline number supports the standard or custom baseline.
pod installto complete baseline upgrading.
You can change some default behaviors of the plug-in by configuring parameters.
Add parameters in the back end of the
plugin "cocoapods-mPaaS". See the following examples:
||In some scenarios (such as the independent framework project), you do not need to add directory files with mPaaS template.||≥ V0.9.5.0.0.2|
After installing the cocoapods-mPaaS plug-in, you can use command line tools to assist your development.
||Upgrade the baseline. The parameter
||In the official version of the plug-in, this command will upgrade the plug-in, and run the installation script again.
In the beta version of the plug-in, this command will implement features of the official version, and upgrade the local baseline.
||Show the complete information of the baseline and the corresponding component.|
, in which
|Filter the information about a module name. For example,
||Show some default baseline information, which is easy to be pasted to Podfile.|
||Directly open the
||Show the complete baseline used in the current project.|
||Show the version number of the current cocoapods-mPaaS plug-in.|