UAInAppMessagingDelegate

@protocol UAInAppMessagingDelegate <NSObject>

Delegate protocol for receiving in-app messaging related callbacks.

  • Allows the delegate to provide a custom display coordinator for the provided message.

    Declaration

    Objective-C

    - (nullable id<UAInAppMessageDisplayCoordinator>)displayCoordinatorForMessage:
        (nonnull UAInAppMessage *)message;

    Swift

    optional func displayCoordinator(for message: UAInAppMessage) -> UAInAppMessageDisplayCoordinator?

    Parameters

    message

    The message.

    Return Value

    An object implementing the UAInAppMessageDisplayCoordinator protocol or nil if no suitable display coordinator is available.

  • Allows the delegate to extend a message before display.

    Declaration

    Objective-C

    - (nonnull UAInAppMessage *)extendMessage:(nonnull UAInAppMessage *)message;

    Swift

    optional func extend(_ message: UAInAppMessage) -> UAInAppMessage

    Parameters

    message

    The message.

    Return Value

    An extended instance of the message.

  • Indicates that an in-app message will be displayed.

    Declaration

    Objective-C

    - (void)messageWillBeDisplayed:(nonnull UAInAppMessage *)message
                        scheduleID:(nonnull NSString *)scheduleID;

    Swift

    optional func messageWillBeDisplayed(_ message: UAInAppMessage, scheduleID: String)

    Parameters

    message

    The associated in-app message.

    scheduleID

    The schedule ID.

  • Indicates that an in-app message has finished displaying.

    Declaration

    Objective-C

    - (void)messageFinishedDisplaying:(nonnull UAInAppMessage *)message
                           scheduleID:(nonnull NSString *)scheduleID
                           resolution:
                               (nonnull UAInAppMessageResolution *)resolution;

    Swift

    optional func messageFinishedDisplaying(_ message: UAInAppMessage, scheduleID: String, resolution: UAInAppMessageResolution)

    Parameters

    message

    The associated in-app message.

    scheduleID

    The schedule ID.

    resolution

    The resolution info.

  • Allows the delegate to override the the choice of window scene for displaying the message.

    Declaration

    Objective-C

    - (nonnull UIWindowScene *)sceneForMessage:(nonnull UAInAppMessage *)message
                                  defaultScene:
                                      (nullable UIWindowScene *)defaultScene;

    Swift

    optional func scene(for message: UAInAppMessage, defaultScene: UIWindowScene?) -> UIWindowScene

    Parameters

    message

    The message.

    defaultScene

    The window scene chosen for displaying the message, or nil if one could not be found.

    Return Value

    A window scene if the delegate chooses to override the choice of scene, or nil otherwise.