UAInAppMessagePrepareAssetsDelegate

Objective-C

@protocol UAInAppMessagePrepareAssetsDelegate <NSObject>

Swift

protocol UAInAppMessagePrepareAssetsDelegate : NSObjectProtocol

Protocol for extending in-app message asset fetching.

  • Extend assets for this message when the message is scheduled

    Note

    This method is intended to allow the app to fetch URLs that the SDK may not be able to fetch. It also covers the case where the Asset Manager can’t decode the message (Custom message type).

    Note

    If implemented, the message WILL NOT display until the completionHandler is called.

    Declaration

    Objective-C

    - (void)onSchedule:(nonnull UAInAppMessage *)message
                   assets:(nonnull UAInAppMessageAssets *)assets
        completionHandler:
            (nonnull void (^)(UAInAppMessagePrepareResult))completionHandler;

    Swift

    func onSchedule(_ message: UAInAppMessage, assets: UAInAppMessageAssets, completionHandler: @escaping (UAInAppMessagePrepareResult) -> Void)

    Parameters

    message

    The message for which the assets can be extended

    assets

    Assets instance for caching assets

    completionHandler

    The completion handler to call when asset fetching is complete.

  • Extend assets for this message when the message is prepared

    Note

    This method is intended to allow the app to fetch URLs that the SDK may not be able to fetch. It also covers the case where the Asset Manager can’t decode the message (Custom message type).

    Note

    If implemented, the message WILL NOT display until the completionHandler is called.

    Declaration

    Objective-C

    - (void)onPrepare:(nonnull UAInAppMessage *)message
                   assets:(nonnull UAInAppMessageAssets *)assets
        completionHandler:
            (nonnull void (^)(UAInAppMessagePrepareResult))completionHandler;

    Swift

    func onPrepare(_ message: UAInAppMessage, assets: UAInAppMessageAssets, completionHandler: @escaping (UAInAppMessagePrepareResult) -> Void)

    Parameters

    message

    The message for which the assets can be extended

    assets

    Assets instance for caching assets

    completionHandler

    The completion handler to call when asset fetching is complete.