Code samples

Updated at:

This topic provides all mPaaS code samples.

We periodically update the code samples with new features. Download the latest version when you integrate a component. For update instructions and usage details, see the corresponding README.md file.

For differences between SDK versions, see Release Notes.

V10.2.3

Android

The Android code samples are packaged in a single ZIP file.

native AAR integration: mpaas_android_app.zip

iOS

The iOS code samples are packaged in a single ZIP file.

CocoaPods integration: eu95_for_mPaas.zip

HarmonyOS NEXT

Important
  • Windows users should use the combined demo.

  • macOS users can use either the combined demo or the split demo.

  • The combined and split demos have the same functionality.

Combined demo

The HarmonyOS NEXT code samples are packaged in a single ZIP file.

HarmonymPaaSDemo.zip

Split demo

Component

Zip package

Message Push

PushDemo.zip

data synchronization

mpaas_sync_demo.zip

Mobile Analysis

mPaaSMasDemo.zip

upgrade

mPaas_Harmony_Upgrade.zip

configuration management

MpaasDemoConfig.zip

H5 Container

mPaasDemoHarmonyOS.zip

Mini Program

MPTinyAppDemo.zip

Mobile Gateway

mpaas_rpc_demo.zip

UTDID

mpaas_udid_demo.zip

scan

mPaaS_scan_demo.zip

Unified Storage

mpaas_datacenter_demo.zip

Note

To access the full features of some network components, you need to submit a ticket.

V10.1.68 and 10.1.60 (Discontinued)

Android

Component

AAR

mobile framework

mobile framework code sample

Mobile Gateway

Mobile Gateway code sample

Message Push

Message Push code sample

Mobile Sync

Mobile Sync code sample

Mobile Analysis

Mobile Analysis code sample

upgrade

upgrade code sample

configuration management

configuration management code sample

hotfix

hotfix code sample

targeting

targeting code sample

H5 Container and offline package

H5 Container and offline package code sample

Mini Program

Mini Program code sample

Native UI Components (AntUI)

General UI code sample

social sharing

social sharing code sample

scan

scan code sample

Unified Storage

Unified Storage code sample

location

location code sample

audio/video calling

audio/video calling code sample

iOS

Component

Extension

CocoaPods

mobile framework

mobile framework code sample for CocoaPods and extensions

Mobile Gateway

Mobile Gateway code sample for CocoaPods and extensions

Message Push

Message Push code sample for CocoaPods and extensions

Mobile Sync

Mobile Sync code sample for CocoaPods and extensions

Mobile Analysis

Mobile Analysis code sample for CocoaPods and extensions

upgrade

upgrade code sample for CocoaPods and extensions

configuration management

configuration management code sample for CocoaPods and extensions

Log Diagnosis

Log Diagnosis code sample for CocoaPods and extensions

targeting

targeting code sample for CocoaPods and extensions

H5 Container

H5 Container code sample for CocoaPods and extensions

Mini Program

Mini Program code sample for CocoaPods and extensions

Native UI Components (AntUI)

Native UI Components (AntUI) code sample for CocoaPods and extensions

social sharing

social sharing code sample for CocoaPods and extensions

scan

scan code sample for CocoaPods and extensions

Unified Storage

Unified Storage code sample for CocoaPods and extensions

location

location code sample for CocoaPods and extensions

audio/video calling

audio/video calling code sample for CocoaPods and extensions

Frontend framework

Note

Support for the Kylin framework is discontinued. We now focus on the Mini Program component, which is more stable and up-to-date. It offers greater ease of use and is adaptable to a wider range of use cases than Kylin. We recommend that new users integrate the Mini Program component and that existing Kylin users migrate to it. For more details, see Mini Program.

V10.1.32 (Discontinued)

Android

The Android code samples are packaged in a single ZIP file.

Android supports two integration methods: based on the mPaaS framework and based on the native framework. Please see the corresponding code examples for your use case. For more information, see Introduction to integration methods.

iOS

iOS supports integration using CocoaPods or the mPaaS plugin. For more information, see Introduction to integration methods.

The code samples are available from the following links:

Note

The code samples for all components in the table are packaged in the Collection ZIP file, allowing you to download all of them at once.

Component

CocoaPods

mPaaS plugin

Extension

Collection (includes all components)

ios-portal-pod-demo-10.1.32-201904020020.zip

N/A

N/A

Message Push

ios-push-pod-demo-10.1.32-201904021854.zip

ios-push-plugin-demo-10.1.32-201904031034.zip

N/A

Mobile Sync

ios-sync-pod-demo-10.1.32-201904011523.zip

ios-sync-plugin-demo-10.1.32-201904012111.zip

N/A

Mobile Analysis

ios-mas-pod-demo-10.1.32-201904021854.zip

ios-mas-plugin-demo-10.1.32-201904031033.zip

N/A

upgrade

ios-upgrade-pod-demo-10.1.32-201904011823.zip

ios-upgrade-plugin-demo-10.1.32-201904012120.zip

N/A

configuration management

ios-config-pod-demo-10.1.32-201904011823.zip

ios-config-plugin-demo-10.1.32-201904012120.zip

N/A

H5 Container

ios-h5-pod-demo-10.1.32-201904011823.zip

ios-h5-plugin-demo-10.1.32-201904020037.zip

N/A

Mini Program

ios-tinyapp-pod-demo-10.1.32-201904011823.zip

ios-tinyapp-plugin-demo-10.1.32-201904021353.zip

N/A

Mobile Gateway

ios-rpc-pod-demo-10.1.32-201904011523.zip

ios-rpc-plugin-demo-10.1.32-201904012111.zip

N/A

social sharing

ios-share-pod-demo-10.1.32-201904021142.zip

ios-share-plugin-demo-10.1.32-201904021142.zip

social sharing code sample for extensions

UTDID

ios-utdid-pod-demo-10.1.32-201904011523.zip

ios-utdid-plugin-demo-10.1.32-201904012111.zip

N/A

scan

ios-scancode-pod-demo-10.1.32-201904021142.zip

ios-scancode-plugin-demo-10.1.32-201904021142.zip

scan code sample for extensions

Unified Storage

ios-datacenter-pod-demo-10.1.32-201904021845.zip

ios-datacenter-plugin-demo-10.1.32-201904031043.zip

N/A

location

ios-lbs-pod-demo-10.1.32-201904021142.zip

ios-lbs-plugin-demo-10.1.32-201904021142.zip

location code sample for extensions

mobile framework

ios-framework-pod-demo-10.1.32-201904011823.zip

ios-framework-plugin-demo-10.1.32-201904012120.zip

N/A

Native UI Components (AntUI)

ios-antui-pod-demo-10.1.32-201904011823.zip

ios-antui-plugin-demo-10.1.32-201904012120.zip

N/A

Log Diagnosis

ios-diagnose-pod-demo-10.1.32-201904011523.zip

ios-diagnose-plugin-demo-10.1.32-201904012111.zip

N/A

targeting

targeting code sample for CocoaPods

ios-cdp-plugin-demo-10.1.32-201908081626.zip

targeting code sample for extensions