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
appID
MoEngage Account Identifier.
completionBlock
completion 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
appID
MoEngage Account Identifier.
completionBlock
completion 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
appID
MoEngage Account Identifier.
completionBlock
completion 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
cid
campaign Identifier of the inbox message
appID
MoEngage 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
cid
campaign Identifier of the inbox message
appID
MoEngage Account Identifier.
completionHandler
completion 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
cid
campaign Identifier of the inbox message
appID
MoEngage 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
cid
Campaign Identifier of the inbox message
appID
MoEngage Account Identifier.
completionHandler
Completion 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
appID
MoEngage Account Identifier.
completionHandler
Completion 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
uiConfig
instance of
MoEngageInboxUIConfiguration
which contains inbox UI information.appID
MoEngage 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
navController
UINavigationController to push the inbox controller
uiConfig
instance of
MoEngageInboxUIConfiguration
which contains inbox UI informationappID
MoEngage Account Identifier.
-
getInboxViewController(withUIConfiguration:
withInboxWithControllerDelegate: forAppID: withCompletionBlock: ) Fetch the
MoEngageInboxViewController
Declaration
Swift
@objc public func getInboxViewController(withUIConfiguration uiConfig: MoEngageInboxUIConfiguration? = nil, withInboxWithControllerDelegate delegate: MoEngageInboxViewControllerDelegate? = nil, forAppID appID: String? = nil, withCompletionBlock completionBlock: @escaping (MoEngageInboxViewController?) -> Void)
Parameters
uiConfig
instance of
MoEngageInboxUIConfiguration
which contains inbox UI informationdelegate
instance that confirms to
MoEngageInboxViewControllerDelegate
protocol.appID
MoEngage Account Identifier.
completionBlock
completion block with
MoEngageInboxViewController
instance.
-
Set the inbox delegate to receive the callback on actions performed on
MoEngageInboxViewController
Declaration
Swift
@objc public func setInboxDelegate(delegate: MoEngageInboxStatusDelegate, forAppID appID: String? = nil)
Parameters
delegate
Instance that confirms to
MoEngageInboxStatusDelegate
protocol.appID
MoEngage Account Identifier.