MessageCenter
public final class MessageCenter : Sendable
Airship Message Center module.
-
Message center display delegate.
Declaration
Swift
@MainActor public var displayDelegate: (any MessageCenterDisplayDelegate)? { get set }
-
Message center inbox.
Declaration
Swift
public let inbox: any 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
@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
@MainActor public var predicate: (any MessageCenterPredicate)? { get set }
-
The shared MessageCenter instance.
Airship.takeOff
must be called before accessing this instance.Declaration
Swift
@available(*, deprecated, message: "Use Airship.messageCenter instead") public static var shared: MessageCenter { get }
-
Display the message center.
Declaration
Swift
@MainActor public func display()
-
Display the given message with animation.
Declaration
Swift
@MainActor public func display(messageID: String)
Parameters
messageID
The messageID of the message.
-
Dismiss the message center.
Declaration
Swift
@MainActor public func dismiss()