MessageCenter

@objc(UAMessageCenter)
public final class MessageCenter : NSObject, Sendable

Airship Message Center module.

  • Message center display delegate.

    Declaration

    Swift

    @objc
    @MainActor
    public var displayDelegate: MessageCenterDisplayDelegate? { get set }
  • Message center inbox.

    Declaration

    Swift

    public let inbox: MessageCenterInboxProtocol
  • The message center controller.

    Declaration

    Swift

    @MainActor
    public var controller: MessageCenterController { get set }
  • Default message center theme. Only applies to the OOTB Message Center. If you are embedding the MessageCenterView directly you should pass the theme in through the view extension .messageCenterTheme(_:).

    Declaration

    Swift

    @MainActor
    public var theme: MessageCenterTheme? { get set }
  • Loads a Message center theme from a plist file. If you are embedding the MessageCenterView directly you should pass the theme in through the view extension .messageCenterTheme(_:).

    Declaration

    Swift

    @objc
    @MainActor
    public func setThemeFromPlist(_ plist: String) throws

    Parameters

    plist

    The name of the plist in the bundle.

  • Default message center predicate. Only applies to the OOTB Message Center. If you are embedding the MessageCenterView directly you should pass the predicate in through the view extension .messageCenterPredicate(_:).

    Declaration

    Swift

    @objc
    @MainActor
    public var predicate: MessageCenterPredicate? { get set }
  • The shared MessageCenter instance. Airship.takeOff must be called before accessing this instance.

    Declaration

    Swift

    @objc
    public static var shared: MessageCenter { get }
  • Display the message center.

    Declaration

    Swift

    @objc
    @MainActor
    public func display()
  • Display the given message with animation.

    Declaration

    Swift

    @objc(displayWithMessageID:)
    @MainActor
    public func display(messageID: String)

    Parameters

    messageID

    The messageID of the message.

  • Dismiss the message center.

    Declaration

    Swift

    @objc
    @MainActor
    public func dismiss()