MoEngageSDKInApp
@objc
public class MoEngageSDKInApp : NSObject
Class to configure to InApp
-
Singleton instance
Declaration
Swift
@objc public static let sharedInstance: MoEngageSDKInApp
-
Call this method to show Pop-up OR Fullscreen InApps inside the app for Default MoEngage Instance
Declaration
Swift
@objc public func showInApp() -
Call this method to show Pop-up OR Fullscreen InApps inside the app.
Declaration
Swift
@objc public func showInApp(forAppId appId: String? = nil)Parameters
appIdMoEngage Account Identifier.
-
Method to show non-intrusive nudge campaign at any available position for Default MoEngage Instance.
Declaration
Swift
@available(tvOS, unavailable) @objc public func showNudge() -
Method to show non-intrusive nudge campaign at any available position.
Declaration
Swift
@available(tvOS, unavailable) @objc public func showNudge(forAppId appId: String? = nil)Parameters
appIdMoEngage Account Identifier.
-
Method to show non-intrusive nudge campaign at the specified position if available for Default MoEngage Instance.
Declaration
Swift
@available(tvOS, unavailable) @objc public func showNudge(atPosition position: MoEngageNudgePosition = NudgePositionAny)Parameters
positionspecifies the position where the nudge has to be showed Top/Bottom.
-
Method to show non-intrusive nudge campaign at the specified position if available.
Declaration
Swift
@available(tvOS, unavailable) @objc public func showNudge(atPosition position: MoEngageNudgePosition = NudgePositionAny, forAppId appId: String? = nil)Parameters
positionspecifies the position where the nudge has to be showed Top/Bottom.
appIdMoEngage Account Identifier.
-
Method to obtain self-handled inApp Campaign for Default MoEngage Instance.
Declaration
Swift
@objc public func getSelfHandledInApp(completionBlock: @escaping ((_ campaignInfo: MoEngageInAppSelfHandledCampaign?, _ accountMeta: MoEngageAccountMeta?) -> Void))Parameters
completionBlockCompletion Block which provides MoEngageInAppSelfHandledCampaign* instance(campaignInfo), incase one is active and satisfies all the rule checks OR else campaignInfo will be nil.
-
Method to obtain self-handled inApp Campaign.
Declaration
Swift
@objc public func getSelfHandledInApp(forAppId appId: String? = nil, completionBlock: @escaping ((_ campaignInfo: MoEngageInAppSelfHandledCampaign?, _ accountMeta: MoEngageAccountMeta?) -> Void))Parameters
appIdMoEngage Account Identifier.
completionBlockCompletion Block which provides MoEngageInAppSelfHandledCampaign* instance(campaignInfo), incase one is active and satisfies all the rule checks OR else campaignInfo will be nil.
-
Method to get multiple self-handled inApp Campaigns.
Declaration
Swift
@objc public func getSelfHandledInApps(completionBlock: @escaping (_ campaignData: MoEngageInAppSelfHandledData) -> Void)Parameters
completionBlockMoEngageInAppSelfHandledData
-
Method to get multiple self-handled inApp Campaigns.
Declaration
Swift
@objc public func getSelfHandledInApps(for appId: String, completionBlock: @escaping (_ campaignData: MoEngageInAppSelfHandledData) -> Void)Parameters
appIdMoEngage Account Identifier.
completionBlockMoEngageInAppSelfHandledData
-
Method to be called if a self-handled InApp is shown inside the app for Default MoEngage Instance.
Declaration
Swift
@objc public func selfHandledShown(campaignInfo: MoEngageInAppSelfHandledCampaign)Parameters
campaignInfoMoEngageInAppSelfHandledCampaign instance with the campaign info.
-
Method to be called if a self-handled InApp is shown inside the app.
Declaration
Swift
@objc public func selfHandledShown(campaignInfo: MoEngageInAppSelfHandledCampaign, forAppId appId: String? = nil)Parameters
campaignInfoMoEngageInAppSelfHandledCampaign instance with the campaign info.
appIdMoEngage Account Identifier.
-
Method to be called if a self-handled InApp is clicked by the user for Default MoEngage Instance
Declaration
Swift
@objc public func selfHandledClicked(campaignInfo: MoEngageInAppSelfHandledCampaign)Parameters
campaignInfoMoEngageInAppSelfHandledCampaign instance with the campaign info.
-
Method to be called if a self-handled InApp is clicked by the user
Declaration
Swift
@objc public func selfHandledClicked(campaignInfo: MoEngageInAppSelfHandledCampaign, forAppId appId: String? = nil)Parameters
campaignInfoMoEngageInAppSelfHandledCampaign instance with the campaign info.
appIdMoEngage Account Identifier.
-
Method to be called if a self-handled InApp is dismissed by the user for Default MoEngage Instance
Declaration
Swift
@objc public func selfHandledDismissed(campaignInfo: MoEngageInAppSelfHandledCampaign)Parameters
campaignInfoMoEngageInAppSelfHandledCampaign instance with the campaign info.
-
Method to be called if a self-handled InApp is dismissed by the user
Declaration
Swift
@objc public func selfHandledDismissed(campaignInfo: MoEngageInAppSelfHandledCampaign, forAppId appId: String? = nil)Parameters
campaignInfoMoEngageInAppSelfHandledCampaign instance with the campaign info.
appIdMoEngage Account Identifier.
-
Method to disable inApps module for Default MoEngage Instance
Declaration
Swift
@objc public func disableInApps() -
Method to disable inApps module.
Declaration
Swift
@objc public func disableInApps(forAppId appId: String? = nil)Parameters
appIdMoEngage Account Identifier.
-
Call this method to block InApps in a particular ViewController for Default MoEngage Instance
Declaration
Swift
@objc public func blockInApp(forViewController viewController: UIViewController)Parameters
viewControllerUIViewController instance where InApps have to be blocked
-
Call this method to block InApps in a particular ViewController
Declaration
Swift
@objc public func blockInApp(forViewController viewController: UIViewController, forAppId appId: String? = nil)Parameters
viewControllerUIViewController instance where InApps have to be blocked
appIdMoEngage Account Identifier.
-
Method to set the current inApp contexts, so that campaign with contexts will only be shown when the current context contains the campaign context for Default MoEngage instance.
Declaration
Swift
@objc public func setCurrentInAppContexts(_ contexts: [String])Parameters
contextsArray of contexts
-
Method to set the current inApp contexts, so that campaign with contexts will only be shown when the current context contains the campaign context
Declaration
Swift
@objc public func setCurrentInAppContexts(_ contexts: [String], forAppId appId: String? = nil)Parameters
contextsArray of contexts
appIdMoEngage Account Identifier.
-
Call this methods to invalidate/reset the contexts set currently in the app for Default MoEngage instance.
Declaration
Swift
@objc public func invalidateInAppContexts() -
Call this methods to invalidate/reset the contexts set currently in the app.
Declaration
Swift
@objc public func invalidateInAppContexts(forAppId appId: String? = nil)Parameters
appIdMoEngage Account Identifier.
-
Method to set delegate for the inApp Callbacks for Default MoEngage instance.
Declaration
Swift
@objc public func setInAppDelegate(_ delegate: MoEngageInAppNativeDelegate)Parameters
delegateMoEngageInAppNative Delegate which will all the callbacks
-
Method to set delegate for the inApp Callbacks
Declaration
Swift
@objc public func setInAppDelegate(_ delegate: MoEngageInAppNativeDelegate, forAppId appId: String? = nil)Parameters
delegateMoEngageInAppNativeDelegate which will all the callbacks
appIdMoEngage Account Identifier.
-
Method to reset the inApp Delegate for Default Instance for Default MoEngage instance.
Declaration
Swift
@objc public func resetInAppDelegate() -
Method to reset the inApp Delegate for Default Instance
Declaration
Swift
@objc public func resetInAppDelegate(forAppId appId: String? = nil)Parameters
appIdMoEngage Account Identifier.