MessageCenterMessage

@objc(UAMessageCenterMessage)
public final class MessageCenterMessage : NSObject, Sendable

Message center message.

  • The message title.

    Declaration

    Swift

    @objc
    public let title: String
  • id

    The Airship message ID. This ID may be used to match an incoming push notification to a specific message.

    Declaration

    Swift

    @objc
    public let id: String
  • The message’s extra dictionary. This dictionary can be populated with arbitrary key-value data at the time the message is composed.

    Declaration

    Swift

    @objc
    public let extra: [String : String]
  • The URL for the message body itself. This URL may only be accessed with Basic Auth credentials set to the user ID and password.

    Declaration

    Swift

    @objc
    public let bodyURL: URL
  • The date and time the message will expire. A nil value indicates it will never expire.

    Declaration

    Swift

    @objc
    public let expirationDate: Date?
  • The date and time the message was sent (UTC).

    Declaration

    Swift

    @objc
    public let sentDate: Date
  • The unread status of the message. true if the message is unread, otherwise false.

    Declaration

    Swift

    @objc
    public let unread: Bool
  • The list icon of the message. nil if there is none.

    Declaration

    Swift

    @objc
    public var listIcon: String? { get }
  • The subtitle of the message. nil if there is none.

    Declaration

    Swift

    @objc
    public var subtitle: String? { get }
  • Parses the message ID.

    Declaration

    Swift

    @objc
    public static func parseMessageID(userInfo: [AnyHashable : Any]) -> String?

    Parameters

    userInfo

    The notification user info.

    Return Value

    The message ID.

  • Tells if the message is expired. true if the message is expired, otherwise false.

    Declaration

    Swift

    @objc
    public var isExpired: Bool { get }
  • Default hash implementation hashes the memory address by default which is always unique and can become out-of-sync with isEquals

    Declaration

    Swift

    public override var hash: Int { get }