NIMSDK-iOS
载入中...
搜索中...
未找到
NIMCustomSystemNotification类 参考

#import <NIMSystemNotification.h>

类 NIMCustomSystemNotification 继承关系图:

构造函数

(instancetype) - initWithContent:
 

属性

int64_t notificationId
 
NSTimeInterval timestamp
 
NSString * sender
 
NSString * receiver
 
NIMSessionType receiverType
 
NSString * content
 
BOOL sendToOnlineUsersOnly
 
NSString * apnsContent
 
NSDictionary * apnsPayload
 
NIMCustomSystemNotificationSettingsetting
 
NIMAntiSpamOptionantiSpamOption
 
NSString * env
 

详细描述

自定义系统通知

函数文档

◆ initWithContent:

- (instancetype) initWithContent: (NSString *)  content

自定义系统通知初始化方法

参数
content自定义系统通知内容
返回
自定义系统通知实例

属性说明

◆ antiSpamOption

- (NIMAntiSpamOption*) antiSpamOption
readwritenonatomicstrong

反垃圾选项

◆ apnsContent

- (NSString*) apnsContent
readwritenonatomiccopy

apns推送文案,长度限制500字 @discussion 默认为nil,用户可以设置当前通知的推送文案

◆ apnsPayload

- (NSDictionary*) apnsPayload
readwritenonatomiccopy

apns推送Payload @discussion 可以通过这个字段定义自定义通知的推送Payload,支持字段参考苹果技术文档,最多支持2K

◆ content

- (NSString*) content
readnonatomiccopy

透传的消息体内容

◆ env

- (NSString*) env
readwritenonatomiccopy

环境变量,用于指向不同的抄送、第三方回调等配置

◆ notificationId

- (int64_t) notificationId
readnonatomicassign

通知 ID @discussion 只有收到的自定义系统通知才有通知 ID

◆ receiver

- (NSString*) receiver
readnonatomiccopy

通知接受者id

◆ receiverType

- (NIMSessionType) receiverType
readnonatomicassign

通知接受者类型

◆ sender

- (NSString*) sender
readnonatomiccopy

通知发起者id

◆ sendToOnlineUsersOnly

- (BOOL) sendToOnlineUsersOnly
readwritenonatomicassign

是否只发送给在线用户 @discussion 默认为YES 如果这个值为NO,通知接受者如果在通知投递时不在线,那么他会在下次登录时收到这个通知

◆ setting

- (NIMCustomSystemNotificationSetting*) setting
readwritenonatomicstrong

自定义系统通知设置 @discussion 可以通过这个字段制定当前通知的各种设置,如是否需要计入推送未读,是否需要带推送前缀等等

◆ timestamp

- (NSTimeInterval) timestamp
readnonatomicassign

时间戳


该类的文档由以下文件生成: