UAMessageCenterInbox
@objc
public final class UAMessageCenterInbox : NSObject, Sendable
Message center inbox.
-
getMessages()
AsynchronousThe list of messages in the inbox.
Declaration
Swift
@objc public func getMessages() async -> [UAMessageCenterMessage]
-
getUser()
AsynchronousThe user associated to the Message Center
Declaration
Swift
@objc public func getUser() async -> UAMessageCenterUser?
-
getUnreadCount()
AsynchronousThe number of messages that are currently unread.
Declaration
Swift
@objc public func getUnreadCount() async -> Int
-
message(forBodyURL:
Asynchronous) Returns the message associated with a particular URL.
Declaration
Swift
@objc public func message(forBodyURL bodyURL: URL) async -> UAMessageCenterMessage?
Parameters
bodyURL
The URL of the message.
Return Value
The associated
MessageCenterMessage
object or nil if a message was unable to be found. -
message(forID:
Asynchronous) Returns the message associated with a particular ID.
Declaration
Swift
@objc public func message(forID messageID: String) async -> UAMessageCenterMessage?
Parameters
messageID
The message ID.
Return Value
The associated
MessageCenterMessage
object or nil if a message was unable to be found. -
refreshMessages()
AsynchronousRefreshes the list of messages in the inbox.
Declaration
Swift
@discardableResult @objc public func refreshMessages() async -> Bool
Return Value
true
if the messages was refreshed, otherwisefalse
. -
markRead(messages:
Asynchronous) Marks messages read.
Declaration
Swift
@objc public func markRead(messages: [UAMessageCenterMessage]) async
Parameters
messages
The list of messages to be marked read.
-
markRead(messageIDs:
Asynchronous) Marks messages read by message IDs.
Declaration
Swift
@objc public func markRead(messageIDs: [String]) async
Parameters
messageIDs
The list of message IDs for the messages to be marked read.
-
delete(messages:
Asynchronous) Marks messages deleted.
Declaration
Swift
@objc public func delete(messages: [UAMessageCenterMessage]) async
Parameters
messages
The list of messages to be marked deleted.
-
delete(messageIDs:
Asynchronous) Marks messages deleted by message IDs.
Declaration
Swift
@objc public func delete(messageIDs: [String]) async
Parameters
messageIDs
The list of message IDs for the messages to be marked deleted.