All Products
Document Center

Mobile Platform as a Service:Integrate by using CocoaPods based on the existing project

Last Updated:Nov 10, 2023

This section describes how to generate configurations based on the native plug-in extension mechanism of CocoaPods to quickly integrate 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
  • An application has been created in the console, and the .config configuration file has been downloaded. For more information, see Create an application in the console.


  1. Copy the .config configuration file to the root directory (at the same level with Podfile) of the project.


    Please ensure the .config file’s filename is ending with iOS. If it is ending with ios, it needs to be updated to iOS manually.

  2. Run the pod mpaas init command to automatically process the Podfile file and add plugin, source, and mPaaS_baseline configurations. The code for automatic configuration is as follows:

     plugin "cocoapods-mPaaS"
     source ''
     mPaaS_baseline 'x.x.x'
  3. Configure the Podfile file.

    1. Modify mPaaS_baseline to specify the mPaaS baseline.

      For example, in mPaaS_baseline '10.2.3', 10.2.3 is the baseline version. For version differences, see Release Note.

    2. Use mPaaS_pod to add mPaaS component dependencies.

      For example, in mPaaS_pod "mPaaS_Nebula", mPaaS_Nebula is a component name. The following table shows more component names.

      Component Configuration

      Applicable Baseline


      mPaaS_pod "mPaaS_LocalLog"


      Local log.

      mPaaS_pod "mPaaS_Log"


      Mobile analysis: behavior log, automation log, Crash log, and performance log analysis.

      mPaaS_pod "mPaaS_Diagnosis"


      Diagnosis: Client diagnosis and analysis.

      mPaaS_pod "mPaaS_RPC"


      Mobile gateway: provides download, upload, RPC call and other functions.

      mPaaS_pod "mPaaS_Sync"


      Mobile synchronization: long connection service.

      mPaaS_pod "mPaaS_Push"


      Message push.

      mPaaS_pod "mPaaS_Config"


      Switch configuration: pull the corresponding value from the server based on the key to dynamically control the client logic.

      mPaaS_pod "mPaaS_Upgrade"


      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"


      Sharing: supports sharing text and pictures to well-known channels such as Weibo, DingTalk, and Alipay friends.

      mPaaS_pod "mPaaS_Nebula"


      HTML5 container and offline package: Nebula container, which supports interaction between the front end and the native.

      mPaaS_pod "mPaaS_UTDID"


      Device ID: easily and quickly obtained for the application to find a specific device safely and effectively.

      mPaaS_pod "mPaaS_DataCenter"


      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"


      Code scan: quickly identifies QR codes and barcodes.

      mPaaS_pod "mPaaS_LBS"


      Mobile positioning: positioning solution for mobile clients.

      mPaaS_pod "mPaaS_CommonUI"


      Universal UI: universal UI component library that provides various UI components.

      mPaaS_pod "mPaaS_BadgeService"


      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"


      Quick Pay function of Alipay: quick payment platform of Alipay.

      mPaaS_pod "mPaaS_Multimedia"


      Multimedia component: supports image download, upload, cache and other functions.

      mPaaS_pod "mPaaS_MobileFramework"


      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"



      mPaaS_pod "mPaaS_TinyApp"


      Applets: integrates lease capabilities.

      mPaaS_pod "MPBaseTest"


      Basic test: basic test module.

      mPaaS_pod "mPaaS_CDP"


      Intelligent delivery: configure various intelligent advertisements and presentations to the clients with dynamic launches.

      mPaaS_pod "mPaaS_AliAccount"


      Mini program: publish the mini program

      mPaaS_pod "mPaaS_ARTVC"


      Voice call and video call: Voice call and video call components. This feature supports two-party video calls, group video calls and online conferences.

      mPaaS_pod "mPaaS_BlueShield"


      Blue Shield encryption component: Add the absBase64Code parameter in the config file to automatically generate a Blue Shield image.

      mPaaS_pod "mPaaS_MDC"


      Mobile Dispatch component: Fine-grained domain name strategic scheduling.

      See the following example of complete Podfile:

  4. Execute pod mpaas update x.x.x in the command line, x.x.x is the version number of configured baseline, such as 10.2.3.

  5. Execute pod install to complete integration. You can also add --verbose to view log details.


    If you are prompted when you execute pod install that you cannot find the library imported from GitHub’s official website, specify the source address for the official GitHub Source at the beginning of podfile:

  6. If you find the third-party library conflicts after accessing it, you can remove the specific third-party library. For the specific operation, see iOS conflict processing.

Upgrading instructions

When a new version of mPaaS is published, you can select the upgrading components, or the general upgrading baseline (namely SDK version).

Upgrading components

  1. When you execute pod mpaas update x.x.x in the command line, x.x.x is the baseline version number currently in use, such as 10.2.3.

    Screenshot 2023-06-19 at 7.png
  2. Execute pod install to complete upgrading for the corresponding components under this baseline.

Upgrade the baseline

  1. In podfile , modify the corresponding baseline number of mPaaS_baseline to complete upgrading for the general baseline. For example, you can modify the baseline number from 10.1.68 to 10.2.3. The baseline number supports the standard or custom baseline.

  2. Execute pod install to complete baseline upgrading.

mPaaS iOS podspec address switch


The original podspec storage warehouse used by mPaaS has ceased service (updates will cease on June 1, 2023, and services will cease on June 30, 2023).

Continuing to use the original repo will have the following impacts:

  1. When using the mPaaS pod plugin for SDK update, the latest version of each baseline cannot be pulled;

  2. After 2023.06.30, using the mPaaS pod plugin cannot pull to any baseline version.

Currently mPaaS has supported all mPaaS versions on


Upgrade mPaaS pod plugin

Execute the following command to update to the latest mPaaS pod plugin.

sh <(curl -s

After the execution is complete, execute the pod plugins installed command in the terminal to check the version of cocoapods-mPaaS. If it shows 0.9.6 or above, the upgrade is successful.


Modify the source configuration in podfile

Replace the originsource ""in podfile with

source "".

API change

This modification only involves the change of the plugin, and there is no change in the use of plugin commands.

Test validation

After completing the above upgrade and modification configuration operations, you can continue to execute the mPaaS pod plugin related pull command to test whether the latest baseline version and SDK can be pulled.

Parameter list

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:




Applicable versions

:guard_image_version => 6

Generate V6 guard image

≥ V0.9.6

:guard_image_version => 5

Generate V5 guard image

≥ V0.9.6

:only_frameworks => true

In some scenarios (such as the independent framework project), you do not need to add directory files with mPaaS template.

≥ V0.

:check_repo => false

In some cases (such as using an intranet proxy), the default added repo is not automatically checked.

≥ V0.


10.2.3 The baseline version does not need to set :guard_image_version, and generates V6 images by default.

Command list

After installing the cocoapods-mPaaS plug-in, you can use command line tools to assist your development.



pod mpaas init

In Podfile, add plugin, source and mPaaS_baseline.

pod mpaas update <VERSION>

Upgrade the baseline. The parameter <VERSION> is the specific baseline number such as 10.2.3. Then upgrade the podspec library.

pod mpaas update --all

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.

pod mpaas info

Show the complete information of the baseline and the corresponding component.

pod mpaas info <NAME> <VERSION>

, in which <VERSION> is optional.

Filter the information about a module name.

pod mpaas info --only-mPaaS

Show some default baseline information, which is easy to be pasted to Podfile.

pod mpaas open

Directly open the . xcworkspace file from the command line.

pod mpaas version

Show the complete baseline used in the current project.

pod mpaas version --plugin

Show the version number of the current cocoapods-mPaaS plug-in.