NIMCustomSystemNotification Class Reference

Inherits from NSObject
Declared in NIMSystemNotification.h

Overview

自定义系统通知

  notificationId

通知 ID

@property (nonatomic, assign, readonly) int64_t notificationId

Discussion

通知 ID

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

Declared In

NIMSystemNotification.h

  timestamp

时间戳

@property (nonatomic, assign, readonly) NSTimeInterval timestamp

Discussion

时间戳

Declared In

NIMSystemNotification.h

  sender

通知发起者id

@property (nullable, nonatomic, copy, readonly) NSString *sender

Discussion

通知发起者id

Declared In

NIMSystemNotification.h

  receiver

通知接受者id

@property (nullable, nonatomic, copy, readonly) NSString *receiver

Discussion

通知接受者id

Declared In

NIMSystemNotification.h

  receiverType

通知接受者类型

@property (nonatomic, assign, readonly) NIMSessionType receiverType

Discussion

通知接受者类型

Declared In

NIMSystemNotification.h

  content

透传的消息体内容

@property (nullable, nonatomic, copy, readonly) NSString *content

Discussion

透传的消息体内容

Declared In

NIMSystemNotification.h

  sendToOnlineUsersOnly

是否只发送给在线用户

@property (nonatomic, assign) BOOL sendToOnlineUsersOnly

Discussion

是否只发送给在线用户

默认为YES 如果这个值为NO,通知接受者如果在通知投递时不在线,那么他会在下次登录时收到这个通知

Declared In

NIMSystemNotification.h

  apnsContent

apns推送文案,长度限制500字

@property (nullable, nonatomic, copy) NSString *apnsContent

Discussion

apns推送文案,长度限制500字

默认为nil,用户可以设置当前通知的推送文案

Declared In

NIMSystemNotification.h

  apnsPayload

apns推送Payload

@property (nullable, nonatomic, copy) NSDictionary *apnsPayload

Discussion

apns推送Payload

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

Declared In

NIMSystemNotification.h

  setting

自定义系统通知设置

@property (nullable, nonatomic, strong) NIMCustomSystemNotificationSetting *setting

Discussion

自定义系统通知设置

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

Declared In

NIMSystemNotification.h

  antiSpamOption

反垃圾选项

@property (nullable, nonatomic, strong) NIMAntiSpamOption *antiSpamOption

Discussion

反垃圾选项

Declared In

NIMSystemNotification.h

  env

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

@property (nullable, nonatomic, copy) NSString *env

Discussion

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

Declared In

NIMSystemNotification.h

– initWithContent:

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

- (instancetype)initWithContent:(NSString *)content

Parameters

content

自定义系统通知内容

Return Value

自定义系统通知实例

Discussion

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

Declared In

NIMSystemNotification.h