All Products
Search
Document Center

Mobile Platform as a Service:Quick start

Last Updated:Jan 22, 2026

Prerequisites

You have already integrated your project with mPaaS. For more information, see the following:

Add SDK

Choose the appropriate method based on your integration approach.

  • Use mPaaS Xcode Extension This method is applicable to mPaaS-based integration or existing projects that use mPaaS plug-ins.

    1. Click the Xcode menu item Editor > mPaaS > Edit Project to open the project editing page.

    2. Select Ariver Mini Program, save your changes, and click Edit to complete the process.

  • Use cocoapods-mPaaS plug-ins This method is applicable to the integration mode that uses CocoaPods based on existing projects.

    1. In your Podfile, specify the baseline as 10.2.3 and add the Ariver Mini Program component dependency using mPaaS_pod "mPaaS_Ariver".

      image

    2. Run the command pod mpaas update 10.2.3 to update the baseline.

    3. Run pod install on the command line to complete the integration.

The following sections use the official Mini Program demo to demonstrate the process, which consists of three main steps:

  1. Initialize the configuration

  2. Publish the Mini Program

  3. Launch the Mini Program

Initialize configuration

Initialize the mPaaS framework

If your app's lifecycle is not managed by the mPaaS framework and instead uses a custom delegate, as shown in the following figure, you must initialize the mPaaS framework manually.

Note

If the mPaaS framework manages your app's lifecycle, its delegate is set to DFClientDelegate. In this case, manual initialization is not required.

image.png

  1. After you create your app's window and navigationController, call the following method to initialize the mPaaS framework.

    image.png

  2. In the category of DTFrameworkInterface, override the shouldInheritDFNavigationController method and return NO so that your navigation controller does not inherit from DFNavigationController.

    image.png

  3. If your app uses multiple navigation controllers and you need to open Mini Programs in different ones, you must reset the container's navigation controller after each switch.

    image.png

Initialize the container

To ensure that a Mini Program can be launched correctly, you must initialize the container by calling the SDK interface after your app finishes launching. This initialization must be performed in the DTFrameworkInterface method - (void)application:(UIApplication *)application beforeDidFinishLaunchingWithOptions:(NSDictionary *)launchOptions.

- (void)application:(UIApplication *)application beforeDidFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    // Initialize the container
    [MPNebulaAdapterInterface initNebula];
}

Notes

If you use the mPaaS framework's managed mode with a privacy alert dialog in the 10.2.3 baseline and set the switch configuration delegate using [MPNebulaAdapterInterface shareInstance].configDelegate = self;, you must configure the switch delegate in both of the following methods. If you do not use a switch delegate, you can skip this step.

3855882e87a5f785ca7b46eebafa7f8f

4337ffda08003159717672dc7ef29db3

Publish the Mini Program

Before you can launch a Mini Program, you must publish it in the mPaaS console. To do so, follow these steps:

  1. Log on to the mPaaS console, select your target application, and then choose Mini Program > Release from the navigation pane on the left.

  2. Configure a virtual domain name. If this is your first time configuring a virtual domain name, go to Mini Program > Mini Program Release > Configuration Management to configure it. Always use a domain that your company controls, such as example.com, to prevent hijacking by third parties.

  3. Create a Mini Program. In the mPaaS console, do the following:

    1. In the navigation pane on the left, choose Mini Program > Mini Program Publishing.

    2. In the left-side navigation pane, choose Mini Program > Mini Program Release.

    3. On the page that appears, click Create.

    4. In the Create Mini Program dialog box, enter the ID and name of the mini program and click OK. The mini program ID is any 16-bit number, for example, 2018080616290001.

    5. In the mini app list, find the new mini app and click Add.

    6. In the Basic Information section, complete the following settings:

      • Version: Enter the Mini Program package version number, such as 1.0.0.0.

      • Client Range: Select the minimum and maximum iOS client versions that are compatible with this Mini Program. The Mini Program can be launched only on clients within this version range. To allow all client versions to launch the Mini Program, set the minimum version to 0.0.0 and leave the maximum version field empty.

        Note

        This version number refers to the version of your client application. You can find this value in the Product Version field of your project's Info.plist file.

        image.png

      • Icon: Click Select File to upload an icon for the Mini Program package. You must upload an icon when you create a Mini Program for the first time. The following figure shows an example icon:

        image.png

      • Upload the Mini Program resource file in .zip format. You can directly use the mPaaS sample Mini Program (download here).

        Note

        Before you upload the file, you must rename both the .zip file and the folder inside it to match your 16-digit Mini Program ID.

    7. In the Configuration Information section, complete the following settings:

      • Main Entry URL: Required. This is the homepage of the Mini Program. The URL must be in the format /index.html#xxx/xxx/xxx/xxx, where the path after the # symbol matches the first value in the pages array of the Mini Program's app.json file. For the mPaaS sample Mini Program, the main entry URL is /index.html#page/tabBar/component/index, as shown in the following figure.

        image.png

      • Keep all other settings at their default values.

    8. Select the Confirm that the preceding information is accurate and do not modify it after you submit it check box.

    9. Click Submit.

  4. Publish the Mini Program. In the mPaaS console, perform the following steps:

    1. In the left-side navigation pane, choose Mini Program > Mini Program Release > Official Mini Program Package Management.

    2. On the Small Packages page, select the small package and version that you want to release, and click Create Release.

    3. In the Create Release panel, configure the following settings:

      • Release Type: Select Official.

      • Release Description: Optional.

    4. Click OK to create the release.

Launch the Mini Program

After you complete the preceding steps, you can launch the sample Mini Program in your iOS project using the following code:

[MPNebulaAdapterInterface startTinyAppWithId:@"2018080616290001" params:nil];
Note

The 2018080616290001 in the preceding code is a sample Mini Program ID. You must replace it with the ID of your Mini Program.