NIMSubscribeEvent Class Reference

Inherits from NSObject
Declared in NIMSubscribeEvent.h

Overview

Subscribe event

  eventId

Event ID

@property (nonatomic, copy, readonly) NSString *eventId

Discussion

Event ID

Declared In

NIMSubscribeEvent.h

  from

Event starter

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

Discussion

Event starter

Declared In

NIMSubscribeEvent.h

  timestamp

Timestamp of an event

@property (nonatomic, assign, readonly) NSTimeInterval timestamp

Discussion

Timestamp of an event

Declared In

NIMSubscribeEvent.h

  type

Event type. The reserved values for event type ranges from 1 to 99999. Predefined events are supported. For more information, see NIMSubscribeSystemEventType

@property (nonatomic, assign) NSInteger type

Discussion

Event type. The reserved values for event type ranges from 1 to 99999. Predefined events are supported. For more information, see NIMSubscribeSystemEventType

Declared In

NIMSubscribeEvent.h

  value

The state value of an event. The value of a predefined event can be an enumeration of NIMSubscribeEventOnlineValue enumeration, or a user-defined value.

@property (nonatomic, assign) NSInteger value

Discussion

The state value of an event. The value of a predefined event can be an enumeration of NIMSubscribeEventOnlineValue enumeration, or a user-defined value.

Declared In

NIMSubscribeEvent.h

  expiry

The validity period of an event. Value range: 60 seconds to 7 days. Unit: seconds. The default value is 7 days.

@property (nonatomic, assign) NSTimeInterval expiry

Discussion

The validity period of an event. Value range: 60 seconds to 7 days. Unit: seconds. The default value is 7 days.

Declared In

NIMSubscribeEvent.h

  sendToOnlineUsersOnly

Specify whether to broadcast messages only to online users

@property (nonatomic, assign) BOOL sendToOnlineUsersOnly

Discussion

Specify whether to broadcast messages only to online users

The default value is YES. If the value is set to NO, the event will be synchronized after the subscriber logs in.

Declared In

NIMSubscribeEvent.h

  syncEnabled

Specify whether to support multiple device synchronization

@property (nonatomic, assign) BOOL syncEnabled

Discussion

Specify whether to support multiple device synchronization

The default value is YES

Declared In

NIMSubscribeEvent.h

  subscribeInfo

Additional information for the subscribed event, NIMSubscribeOnlineInfo when NIMSubscribeSystemEventTypeOnline is subscribed.

@property (nonatomic, strong, readonly) id subscribeInfo

Discussion

Additional information for the subscribed event, NIMSubscribeOnlineInfo when NIMSubscribeSystemEventTypeOnline is subscribed.

Declared In

NIMSubscribeEvent.h

– setExt:

Event extension field. The maximum length of the field is 4K.

- (void)setExt:(NSString *)ext

Parameters

ext

Extension field

Discussion

Event extension field. The maximum length of the field is 4K.

Declared In

NIMSubscribeEvent.h

– ext:

Event extension field

- (nullable NSString *)ext:(NIMLoginClientType)type

Parameters

type

client type

Return Value

extension field

Discussion

Event extension field

Declared In

NIMSubscribeEvent.h