目录

EventReport

Class Info

public class EventReport

本类提供了上报消息事件的方法。

Public Method Summary

Qualifier and Type

Method Name and Description

void

reportPushMsgComingEvent:(NSDictionary *) userInfo

上报消息到达事件。

void

reportPushMsgClickEvent:(NSDictionary *) userInfo

上报消息点击事件。

void

reportPushMsgSilentEvent:(NSDictionary *) userInfo

上报静默消息事件。

void

reportPushMsgEvent:(NSDictionary *)userInfo eventID:(NSString *) eventId

上报自定义事件。

Public Methods

[h2]reportPushMsgComingEvent:(NSDictionary *) userInfo

Method

- (void)reportPushMsgComingEvent:(NSDictionary *) userInfo

上报消息到达事件。

Parameters

Name

Description

userInfo

上报消息体内容。

“Objective-C”
#import <HmsPushSdk/EventReport.h>
[[EventReport getInstance]reportPushMsgComingEvent:userInfo];
“Swift”
import HmsPushSdk
let myDictionary : Dictionary<String,String> = ["title":"Tome","body":"welcome"];
EventReport.getInstance().reportPushMsgComingEvent(myDictionary);

[h2]reportPushMsgClickEvent:(NSDictionary *) userInfo

Method

- (void)reportPushMsgClickEvent:(NSDictionary *) userInfo

上报消息点击事件。

Parameters

Name

Description

userInfo

上报消息体内容。

“Objective-C”
#import <HmsPushSdk/EventReport.h>
[[EventReport getInstance]reportPushMsgClickEvent:userInfo];
“Swift”
import HmsPushSdk
let myDictionary : Dictionary<String,String> = ["title":"Tome","body":"welcome"];
EventReport.getInstance().reportPushMsgClickEvent(myDictionary);

[h2]reportPushMsgSilentEvent:(NSDictionary *) userInfo

Method

- (void)reportPushMsgSilentEvent:(NSDictionary *) userInfo

上报静默消息到达事件。

Parameters

Name

Description

userInfo

上报消息体内容。

“Objective-C”
#import <HmsPushSdk/EventReport.h>
[[EventReport getInstance]reportPushMsgSilentEvent:userInfo];
“Swift”
import HmsPushSdk
let myDictionary : Dictionary<String,String> = ["title":"Tome","body":"welcome"];
EventReport.getInstance().reportPushMsgSilentEvent(myDictionary);

[h2]reportPushMsgEvent:(NSDictionary *) userInfo eventID:(NSString *) userinfo

Method

- (void)reportPushMsgEvent:(NSDictionary *) userInfo

eventID:(NSString *) userInfo;

上报自定义消息事件。

Parameters

Name

Description

userInfo

上报消息体内容。

eventID

自定义消息事件标题,请勿填写纯数字。

Objective-C Sample code:
“Objective-C”
#import <HmsPushSdk/EventReport.h>
[[EventReport getInstance]reportPushMsgSilentEvent:userInfo eventID:@"yourEventID"];
“Swift”
import HmsPushSdk
let myDictionary : Dictionary<String,String> = ["title":"Tome","body":"welcome"];
EventReport.getInstance().reportPushMsgComingEvent(myDictionary);