MessageCenterInbox
public protocol MessageCenterInbox : AnyObject, Sendable
Airship Message Center inbox protocol.
-
refreshMessages()AsynchronousRefreshes the list of messages in the inbox.
Declaration
Swift
@discardableResult func refreshMessages() async -> BoolReturn Value
trueif the messages was refreshed, otherwisefalse. -
markRead(messages:Asynchronous) Marks messages read.
Declaration
Swift
func markRead(messages: [MessageCenterMessage]) asyncParameters
messagesThe list of messages to be marked read.
-
markRead(messageIDs:Asynchronous) Marks messages read by message IDs.
Declaration
Swift
func markRead(messageIDs: [String]) asyncParameters
messageIDsThe list of message IDs for the messages to be marked read.
-
delete(messages:Asynchronous) Marks messages deleted.
Declaration
Swift
func delete(messages: [MessageCenterMessage]) asyncParameters
messagesThe list of messages to be marked deleted.
-
delete(messageIDs:Asynchronous) Marks messages deleted by message IDs.
Declaration
Swift
func delete(messageIDs: [String]) asyncParameters
messageIDsThe list of message IDs for the messages to be marked deleted.
-
message(forBodyURL:Asynchronous) Returns the message associated with a particular URL.
Declaration
Swift
func message(forBodyURL bodyURL: URL) async -> MessageCenterMessage?Parameters
bodyURLThe URL of the message.
Return Value
The associated
MessageCenterMessageobject or nil if a message was unable to be found. -
message(forID:Asynchronous) Returns the message associated with a particular ID.
Declaration
Swift
func message(forID messageID: String) async -> MessageCenterMessage?Parameters
messageIDThe message ID.
Return Value
The associated
MessageCenterMessageobject or nil if a message was unable to be found. -
Publisher that emits messages.
Declaration
Swift
@MainActor var messagePublisher: AnyPublisher<[MessageCenterMessage], Never> { get } -
Async Stream on messages’ updates
Declaration
Swift
var messageUpdates: AsyncStream<[MessageCenterMessage]> { get } -
Publisher that emits unread counts.
Declaration
Swift
@MainActor var unreadCountPublisher: AnyPublisher<Int, Never> { get } -
Async Stream of unread count updates
Declaration
Swift
var unreadCountUpdates: AsyncStream<Int> { get } -
messagesAsynchronousThe list of messages in the inbox.
Declaration
Swift
var messages: [MessageCenterMessage] { get async } -
userAsynchronousThe user associated to the Message Center
Declaration
Swift
var user: MessageCenterUser? { get async } -
unreadCountAsynchronousThe number of messages that are currently unread.
Declaration
Swift
var unreadCount: Int { get async } -
refreshMessages(timeout:Asynchronous) Refreshes the list of messages in the inbox.
Declaration
Swift
@discardableResult func refreshMessages(timeout: TimeInterval) async throws -> BoolReturn Value
trueif the messages was refreshed, otherwisefalse.
View on GitHub