UAInboxMessage

@interface UAInboxMessage : NSObject

This class represents a Rich Push Inbox message. It contains all the available information about a message, including the URLs where the message can be retrieved.

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

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSString *_Nonnull messageID;

    Swift

    var messageID: String { get }
  • 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

    Objective-C

    @property (readonly, nonatomic) NSURL *_Nonnull messageBodyURL;

    Swift

    var messageBodyURL: URL { get }
  • The URL for the message. This URL may only be accessed with Basic Auth credentials set to the user ID and password.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSURL *_Nonnull messageURL;

    Swift

    var messageURL: URL { get }
  • The MIME content type for the message (e.g., text/html).

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSString *_Nonnull contentType;

    Swift

    var contentType: String { get }
  • YES if the message is unread, otherwise NO.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL unread;

    Swift

    var unread: Bool { get }
  • YES if the message is deleted, otherwise NO.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL deleted;

    Swift

    var deleted: Bool { get }
  • The date and time the message was sent (UTC).

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSDate *_Nonnull messageSent;

    Swift

    var messageSent: Date { get }
  • The date and time the message will expire.

    A nil value indicates it will never expire.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) NSDate *messageExpiration;

    Swift

    var messageExpiration: Date? { get }
  • The message title.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSString *_Nonnull title;

    Swift

    var title: String { get }
  • The message’s extra dictionary. This dictionary can be populated with arbitrary key-value data at the time the message is composed.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSDictionary *_Nonnull extra;

    Swift

    var extra: [AnyHashable : Any] { get }
  • The raw message dictionary. This is the dictionary that originally created the message. It can contain more values then the message.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSDictionary *_Nonnull rawMessageObject;

    Swift

    var rawMessageObject: [AnyHashable : Any] { get }
  • The parent inbox.

    Note that this object is not retained by the message.

    Declaration

    Objective-C

    @property (readonly, nonatomic) UAInboxMessageList *_Nullable messageList;

    Swift

    weak var messageList: UAInboxMessageList? { get }
  • Mark the message as read.

    Declaration

    Objective-C

    - (nullable UADisposable *)markMessageReadWithCompletionHandler:
        (nullable UAInboxMessageCallbackBlock)completionHandler;

    Swift

    func markRead(completionHandler: UAInboxMessageCallbackBlock? = nil) -> Any!

    Parameters

    completionHandler

    A block to be executed on completion.

    Return Value

    A UADisposable which can be used to cancel callback execution, or nil if the message is already marked read.

  • YES if the message is expired, NO otherwise

    Declaration

    Objective-C

    - (BOOL)isExpired;

    Swift

    func isExpired() -> Bool