MoEngageSDKInbox
@objc
public class MoEngageSDKInbox : NSObject, @unchecked Sendable
Class to configure the Inbox
Concurrency
@unchecked Sendable: the singleton holds no mutable state — every method is a
stateless dispatcher into MoEngageAction. Mirrors MoEngageSDKCards.
-
Singleton instance
Declaration
Swift
@objc public static let sharedInstance: MoEngageSDKInbox
-
Fetch inbox messages.
Declaration
Swift
public func getInboxMessages( forAppID appID: String? = nil, isolation actor: isolated (any Actor)? = #isolation, withCompletionBlock completionBlock: @escaping @MainActor(unsafe) ([MoEngageInboxEntry], MoEngageAccountMeta?) -> Void )Parameters
appIDMoEngage Account Identifier.
isolationThe caller’s actor isolation, captured automatically.
completionBlockcompletion block with inbox messages and account information, invoked on the main thread.
-
Declaration
Swift
@_disfavoredOverload @objc public func getInboxMessages(forAppID appID: String? = nil, withCompletionBlock completionBlock: @escaping @MainActor (Array<MoEngageInboxEntry>, MoEngageAccountMeta?) -> Void) -
Fetch inbox message count
Declaration
Swift
public func getAllNotificationCount( forAppID appID: String? = nil, isolation actor: isolated (any Actor)? = #isolation, withCompletionBlock completionBlock: @escaping @MainActor(unsafe) (Int, MoEngageAccountMeta?) -> Void )Parameters
appIDMoEngage Account Identifier.
isolationThe caller’s actor isolation, captured automatically.
completionBlockcompletion block with inbox message count and account information, invoked on the main thread.
-
Declaration
Swift
@_disfavoredOverload @objc public func getAllNotificationCount(forAppID appID: String? = nil, withCompletionBlock completionBlock: @escaping @MainActor (Int, MoEngageAccountMeta?) -> Void) -
Fetch unread inbox message count.
Declaration
Swift
public func getUnreadNotificationCount( forAppID appID: String? = nil, isolation actor: isolated (any Actor)? = #isolation, withCompletionBlock completionBlock: @escaping @MainActor(unsafe) (Int, MoEngageAccountMeta?) -> Void )Parameters
appIDMoEngage Account Identifier.
isolationThe caller’s actor isolation, captured automatically.
completionBlockcompletion block with unread message count and account information, invoked on the main thread.
-
Declaration
Swift
@_disfavoredOverload @objc public func getUnreadNotificationCount(forAppID appID: String? = nil, withCompletionBlock completionBlock: @escaping @MainActor (Int, MoEngageAccountMeta?) -> Void) -
Perform the action associated with Inbox message
Declaration
Swift
public func processInboxNotification( withCampaignID cid: String, forAppID appID: String? = nil, isolation actor: isolated (any Actor)? = #isolation )Parameters
cidcampaign Identifier of the inbox message
appIDMoEngage Account Identifier.
isolationThe caller’s actor isolation, captured automatically.
-
Declaration
Swift
@_disfavoredOverload @objc public func processInboxNotification(withCampaignID cid: String, forAppID appID: String? = nil) -
Mark the inbox message as Clicked and Read.
Declaration
Swift
public func markInboxNotificationClicked( withCampaignID cid: String, forAppID appID: String? = nil, isolation actor: isolated (any Actor)? = #isolation, completionHandler: (@MainActor(unsafe) (Bool) -> Void)? = nil )Parameters
cidcampaign Identifier of the inbox message
appIDMoEngage Account Identifier.
isolationThe caller’s actor isolation, captured automatically.
completionHandlercompletion block with Bool value indicating the status of update, invoked on the main thread.
-
Declaration
Swift
@_disfavoredOverload @objc public func markInboxNotificationClicked(withCampaignID cid: String, forAppID appID: String? = nil, completionHandler: (@MainActor (Bool) -> Void)? = nil) -
Track Inbox clicked event
Declaration
Swift
public func trackInboxClick( withCampaignID cid: String, forAppID appID: String? = nil, isolation actor: isolated (any Actor)? = #isolation )Parameters
cidcampaign Identifier of the inbox message
appIDMoEngage Account Identifier.
isolationThe caller’s actor isolation, captured automatically.
-
Declaration
Swift
@_disfavoredOverload @objc public func trackInboxClick(withCampaignID cid: String, forAppID appID: String? = nil) -
Remove inbox message based on Campaign id
Declaration
Swift
public func removeInboxMessage( withCampaignID cid: String, forAppID appID: String? = nil, isolation actor: isolated (any Actor)? = #isolation, completionHandler: (@MainActor(unsafe) (Bool) -> Void)? = nil )Parameters
cidCampaign Identifier of the inbox message
appIDMoEngage Account Identifier.
isolationThe caller’s actor isolation, captured automatically.
completionHandlerCompletion block with Bool value indicating the status of update, invoked on the main thread.
-
Declaration
Swift
@_disfavoredOverload @objc public func removeInboxMessage(withCampaignID cid: String, forAppID appID: String? = nil, completionHandler: (@MainActor (Bool) -> Void)? = nil) -
Remove all inbox messages
Declaration
Swift
public func removeInboxMessages( forAppID appID: String? = nil, isolation actor: isolated (any Actor)? = #isolation, completionHandler: (@MainActor(unsafe) (Bool) -> Void)? = nil )Parameters
appIDMoEngage Account Identifier.
isolationThe caller’s actor isolation, captured automatically.
completionHandlerCompletion block with Bool value indicating the status of update, invoked on the main thread.
-
Declaration
Swift
@_disfavoredOverload @objc public func removeInboxMessages(forAppID appID: String? = nil, completionHandler: (@MainActor (Bool) -> Void)? = nil)
-
Set the inbox delegate to receive the callback on actions performed on
MoEngageInboxViewControllerDeclaration
Swift
public func setInboxDelegate( delegate: MoEngageInboxStatusDelegate, forAppID appID: String? = nil, isolation actor: isolated (any Actor)? = #isolation )Parameters
delegateInstance that confirms to
MoEngageInboxStatusDelegateprotocol.appIDMoEngage Account Identifier.
isolationThe caller’s actor isolation, captured automatically.
-
Declaration
Swift
@_disfavoredOverload @objc public func setInboxDelegate(delegate: MoEngageInboxStatusDelegate, forAppID appID: String? = nil)
-
Present InboxController
Declaration
Swift
@MainActor @objc public func presentInboxViewController( withUIConfiguration uiConfig: MoEngageInboxUIConfiguration? = nil, withInboxWithControllerDelegate delegate: MoEngageInboxViewControllerDelegate? = nil, forAppID appID: String? = nil )Parameters
uiConfiginstance of
MoEngageInboxUIConfigurationwhich contains inbox UI information.delegateinstance that confirms to
MoEngageInboxViewControllerDelegateprotocol.appIDMoEngage Account Identifier.
-
pushInboxViewController(toNavigationController:withUIConfiguration: withInboxWithControllerDelegate: forAppID: ) Push InboxController
Declaration
Swift
@MainActor @objc public func pushInboxViewController( toNavigationController navController: UINavigationController, withUIConfiguration uiConfig: MoEngageInboxUIConfiguration? = nil, withInboxWithControllerDelegate delegate: MoEngageInboxViewControllerDelegate? = nil, forAppID appID: String? = nil )Parameters
navControllerUINavigationController to push the inbox controller
uiConfiginstance of
MoEngageInboxUIConfigurationwhich contains inbox UI informationdelegateinstance that confirms to
MoEngageInboxViewControllerDelegateprotocol.appIDMoEngage Account Identifier.
-
getInboxViewController(withUIConfiguration:withInboxWithControllerDelegate: forAppID: withCompletionBlock: ) Fetch the
MoEngageInboxViewControllerDeclaration
Swift
@MainActor @objc public func getInboxViewController( withUIConfiguration uiConfig: MoEngageInboxUIConfiguration? = nil, withInboxWithControllerDelegate delegate: MoEngageInboxViewControllerDelegate? = nil, forAppID appID: String? = nil, withCompletionBlock completionBlock: @escaping @MainActor (MoEngageInboxViewController?) -> Void )Parameters
uiConfiginstance of
MoEngageInboxUIConfigurationwhich contains inbox UI informationdelegateinstance that confirms to
MoEngageInboxViewControllerDelegateprotocol.appIDMoEngage Account Identifier.
completionBlockcompletion block with
MoEngageInboxViewControllerinstance; invoked withnilwhen no SDK instance is registered forappID.