MoEngageInAppAssetsManager

@objc
public final class MoEngageInAppAssetsManager : NSObject

Manages In-App campaign assets: downloading images/HTML resources, resolving local file paths, and removing expired or campaign-specific assets. Exposed to Objective-C via the generated MoEngageInApps-Swift.h (no separate .h).

  • Swift callers can use shared; Obj-C uses sharedAssetsManager.

    Declaration

    Swift

    @objc
    public static func sharedAssetsManager() -> MoEngageInAppAssetsManager
  • Declaration

    Swift

    public static let shared: MoEngageInAppAssetsManager

Download assets (public API)

  • Downloads assets for an In-App campaign. HTML campaigns use limited parallelism; native campaigns download all assets concurrently. Completion is called on main queue.

    Declaration

    Swift

    @objc
    public func downloadAssets(
        _ resourceLinks: NSDictionary,
        withInAppType inAppType: MoEngageInAppType,
        forCampaignID campaignID: String,
        forSDKInstance sdkInstance: MoEngageSDKInstance,
        andCompletionBlock completionBlock: @escaping (Bool) -> Void
    )

    Parameters

    resourceLinks

    Map of relative path (or key) to resource URL string.

    inAppType

    Campaign type (e.g. HTML vs native).

    campaignID

    Campaign identifier.

    sdkInstance

    SDK instance for network and logging.

    completionBlock

    Called with true if all assets downloaded successfully.

Image / path utilities (public API)

Delete / cleanup (public API)

Image/HTML asset download

Video & network