HYPMessageInfo

@interface HYPMessageInfo

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.

  • 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) int identifier;

    Swift

    var identifier: Int32 { get }
    • This method initializes the instance with the given identifier.

    Declaration

    Objective-C

    - (instancetype)initWithIdentifier:(id)identifier;

    Swift

    init!(identifier: Any!)

    Parameters

    identifier

    The identifier to assign.

  • This method returns YES if the two instances (self and messageInfo) have the same identifier. It returns NO otherwise.

    Declaration

    Objective-C

    - (id)isEqualToMessageInfo:(HYPMessageInfo *)messageInfo;

    Swift

    func isEqual(to messageInfo: HYPMessageInfo!) -> Any!

    Return Value

    Whether the message and the message metadata have the same identifier.