MoEngageSDKInApp

@objc
public class MoEngageSDKInApp : NSObject

Class to configure to InApp

  • Singleton instance

    Declaration

    Swift

    @objc
    public static let sharedInstance: MoEngageSDKInApp

General Campaigns

  • Call this method to show Pop-up OR Fullscreen InApps inside the app for Default MoEngage Instance.

    Declaration

    Swift

    @discardableResult
    @objc
    public func showInApp() -> MoEngageShowInAppTask

    Return Value

    MoEngageShowInAppTask that resolves once the selected campaign has been rendered (after the configured display delay), or rejects with MoEngageInAppRequestFailureReason (.campaignNotFound / .renderFailed / .htmlAssetLoadFailed) or the shared .sdkNotInitialized code.

  • Call this method to show Pop-up OR Fullscreen InApps inside the app.

    Declaration

    Swift

    @discardableResult
    @objc
    public func showInApp(forAppId appId: String? = nil) -> MoEngageShowInAppTask

    Parameters

    appId

    MoEngage Account Identifier.

    Return Value

    MoEngageShowInAppTask — see showInApp() for the resolve / reject contract.

Nudge Campaigns

Self Handled Campaigns

Configuration-shape APIs

  • 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

    appId

    MoEngage Account Identifier.

Block InApps

  • Call this method to block InApps in a particular ViewController for Default MoEngage Instance.

    Declaration

    Swift

    @objc
    public func blockInApp(forViewController viewController: UIViewController)
  • Call this method to block InApps in a particular ViewController.

    Declaration

    Swift

    @objc
    public func blockInApp(forViewController viewController: UIViewController, forAppId appId: String? = nil)

InApp Contexts

  • Method to set the current inApp contexts for Default MoEngage instance.

    Declaration

    Swift

    @objc
    public func setCurrentInAppContexts(_ contexts: [String])
  • Method to set the current inApp contexts.

    Declaration

    Swift

    @objc
    public func setCurrentInAppContexts(_ contexts: [String], forAppId appId: String? = nil)
  • Invalidate/reset the contexts set currently in the app for Default MoEngage instance.

    Declaration

    Swift

    @objc
    public func invalidateInAppContexts()
  • Invalidate/reset the contexts set currently in the app.

    Declaration

    Swift

    @objc
    public func invalidateInAppContexts(forAppId appId: String? = nil)

InApp Delegate Handling