All Products
Search
Document Center

Mobile Platform as a Service:iOS client development

Last Updated:Jan 14, 2026

Important

mPaaS will stop maintaining the 10.1.32 baseline starting June 28, 2020. Please use the 10.1.68 series baseline (discontinued maintenance) or 10.1.60 series baseline (discontinued maintenance) series baselines. You can refer to the mPaaS 10.1.68 upgrade guide or the mPaaS 10.1.60 upgrade guide to upgrade the baseline version.

This topic describes how to develop custom event analysis funciton on the iOS client, including:

  1. Integrate MAS

  2. Record event logs

Integrate MAS

Integrate MAS by referring to Instructions on MAS integration procedure.

Record event logs

The section guides you how to record event logs through a code sample of 10.1.68 version.

Code sample

#import <MPMasAdapter/MPMasAdapter.h>

// Currently actionId supports only KActionID_Event and you do not need to pay attention to it.
NSString * actionId = KActionID_Event;
// Event ID
NSString * eventId = @"PayResults";
// Add attributes
NSMutableDictionary * extParam = [NSMutableDictionary dictionary];
// Attribute: payment time. Key corresponds to the attribute ID and Value corresponds to the attribute value.
[extParam setObject:@"2017-05-01 12:03:16" forKey:@"pay_time"];
// Attribute: user ID
[extParam setObject:@"the-userId" forKey:@"user_id"];
// Attribute: payment mode
[extParam setObject:@"alipay" forKey:@"payment_method"];

// Print logs
[MPRemoteLoggingInterface writeLogWithActionId:actionId eventId:eventId extParam:extParam];

Parameters description

Parameter

Description

eventId

An event ID uniquely identifies an event. For more information, see the description of tutorial scenario in About this tutorial.

extParam

ExtParam of the NSDictionary type is used to store attributes associated with events.

  • Key: corresponding to the attribute ID. For more information, see the description of tutorial scenario in About this tutorial.

  • Value: corresponding to the attribute value. The attribute value is stored as a character string on the client. In actual analysis, the server supports converting the attribute value into a character, integer, or float value.