Class Info |
|---|
public class EventReport 本类提供了上报消息事件的方法。 |
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 上报自定义事件。 |
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); 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); 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); Method |
|---|
- (void)reportPushMsgEvent:(NSDictionary *) userInfo eventID:(NSString *) userInfo; 上报自定义消息事件。 |
Parameters
Name | Description |
|---|---|
userInfo | 上报消息体内容。 |
eventID | 自定义消息事件标题,请勿填写纯数字。 |
“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);