HYPMessageInfo
@interface HYPMessageInfo : NSObject
@abstract Message metadata.
@discussion This class is used to hold message metadata. At this point, it only includes the message identifier, but this will change with future releases. It’s mostly useful to associate messages with the metadata, as Hype notifications usually use instances of this class and not HYPMessage. This is motivated by the fact that HYPMessage holds the message’s payload, which would consume more memory.
-
@abstract Message identifier.
@discussion This identifier is used to keep track of delivery state of messages sent of the network. Each message is assigned a unique identifier.
Declaration
Objective-C
@property (readonly, atomic) NSUInteger identifier;
Swift
var identifier: UInt { get }
-
@abstract Initializes the instance.
@discussion This method initializes the instance with the given identifier.
Declaration
Objective-C
- (instancetype)initWithIdentifier:(NSUInteger)identifier;
Swift
init!(identifier: UInt)
Parameters
identifier
The identifier to assign.
-
@abstract Compares two HYPMessageInfo instances.
@discussion This method returns YES if the two instances (self and messageInfo) have the same identifier. It returns NO otherwise.
Declaration
Objective-C
- (BOOL)isEqualToMessageInfo:(HYPMessageInfo *)messageInfo;
Swift
func isEqual(to messageInfo: HYPMessageInfo!) -> Bool
Return Value
Whether the message and the message metadata have the same identifier.