MoEngageSDKInbox
@objc
public class MoEngageSDKInbox : NSObject
Class to configure the Inbox
-
Singleton instance
Declaration
Swift
@objc public static let sharedInstance: MoEngageSDKInbox
-
Fetch inbox messages.
Declaration
Swift
@objc public func getInboxMessages(forAppID appID: String? = nil, withCompletionBlock completionBlock: @escaping ((Array<MoEngageInboxEntry>, MoEngageAccountMeta?) -> Void))Parameters
appIDMoEngage Account Identifier.
completionBlockcompletion block with inbox messages and account information.
-
Fetch inbox message count
Declaration
Swift
@objc public func getAllNotificationCount(forAppID appID: String? = nil, withCompletionBlock completionBlock: @escaping ((Int, MoEngageAccountMeta?) -> Void))Parameters
appIDMoEngage Account Identifier.
completionBlockcompletion block with inbox message account and account information.
-
Fetch unread inbox message count.
Declaration
Swift
@objc public func getUnreadNotificationCount(forAppID appID: String? = nil, withCompletionBlock completionBlock: @escaping ((Int, MoEngageAccountMeta?) -> Void))Parameters
appIDMoEngage Account Identifier.
completionBlockcompletion block with unread message count and account information.
-
Perform the action associated with Inbox message
Declaration
Swift
@objc public func processInboxNotification(withCampaignID cid: String, forAppID appID: String? = nil)Parameters
cidcampaign Identifier of the inbox message
appIDMoEngage Account Identifier.
-
Mark the inbox message as Clicked and Read.
Declaration
Swift
@objc public func markInboxNotificationClicked(withCampaignID cid: String, forAppID appID: String? = nil, completionHandler: ((Bool) -> Void)? = nil)Parameters
cidcampaign Identifier of the inbox message
appIDMoEngage Account Identifier.
completionHandlercompletion block with Bool value indicating the status of update.
-
Track Inbox clicked event
Declaration
Swift
@objc public func trackInboxClick(withCampaignID cid: String, forAppID appID: String? = nil)Parameters
cidcampaign Identifier of the inbox message
appIDMoEngage Account Identifier.
-
Remove inbox message based on Campaign id
Declaration
Swift
@objc public func removeInboxMessage(withCampaignID cid: String, forAppID appID: String? = nil, completionHandler: ((Bool) -> Void)? = nil)Parameters
cidCampaign Identifier of the inbox message
appIDMoEngage Account Identifier.
completionHandlerCompletion block with Bool value indicating the status of update.
-
Remove all inbox messages
Declaration
Swift
@objc public func removeInboxMessages(forAppID appID: String? = nil, completionHandler: ((Bool) -> Void)? = nil)Parameters
appIDMoEngage Account Identifier.
completionHandlerCompletion block with Bool value indicating the status of update.
-
Present InboxController
Declaration
Swift
@objc public func presentInboxViewController(withUIConfiguration uiConfig: MoEngageInboxUIConfiguration? = nil, withInboxWithControllerDelegate delegate: MoEngageInboxViewControllerDelegate? = nil, forAppID appID: String? = nil)Parameters
uiConfiginstance of
MoEngageInboxUIConfigurationwhich contains inbox UI information.appIDMoEngage Account Identifier.
-
pushInboxViewController(toNavigationController:withUIConfiguration: withInboxWithControllerDelegate: forAppID: ) Push InboxController
Declaration
Swift
@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 informationappIDMoEngage Account Identifier.
-
getInboxViewController(withUIConfiguration:withInboxWithControllerDelegate: forAppID: withCompletionBlock: ) Fetch the
MoEngageInboxViewControllerDeclaration
Swift
@objc public func getInboxViewController(withUIConfiguration uiConfig: MoEngageInboxUIConfiguration? = nil, withInboxWithControllerDelegate delegate: MoEngageInboxViewControllerDelegate? = nil, forAppID appID: String? = nil, withCompletionBlock completionBlock: @escaping (MoEngageInboxViewController?) -> Void)Parameters
uiConfiginstance of
MoEngageInboxUIConfigurationwhich contains inbox UI informationdelegateinstance that confirms to
MoEngageInboxViewControllerDelegateprotocol.appIDMoEngage Account Identifier.
completionBlockcompletion block with
MoEngageInboxViewControllerinstance.
-
Set the inbox delegate to receive the callback on actions performed on
MoEngageInboxViewControllerDeclaration
Swift
@objc public func setInboxDelegate(delegate: MoEngageInboxStatusDelegate, forAppID appID: String? = nil)Parameters
delegateInstance that confirms to
MoEngageInboxStatusDelegateprotocol.appIDMoEngage Account Identifier.