GoogleInteractiveMediaAds Framework Reference

  • The IMACompanionDelegate protocol allows developers to receive events from companion ad slots.

  • It provides optional methods to handle events like when a companion ad slot is filled or clicked.

  • The companionSlot:filled: method indicates whether a specific companion ad slot has been successfully filled with an ad.

  • The companionSlotWasClicked: method is triggered when a user clicks on a companion ad slot and successfully navigates away.

IMACompanionDelegate

@protocol IMACompanionDelegate <NSObject>

Delegate to receive events from the companion ad slot.

  • Called when the slot is either filled or not filled.

    Declaration

    Swift

    optional func companionSlot(_ slot: IMACompanionAdSlot, filled: Bool)

    Objective-C

    - (void)companionSlot:(nonnull IMACompanionAdSlot *)slot filled:(BOOL)filled;

    Parameters

    slot

    the IMACompanionAdSlot receiving the event

    filled

    is the slot filled or not

  • Called when the slot is clicked on by the user and will successfully navigate away.

    Declaration

    Swift

    optional func companionSlotWasClicked(_ slot: IMACompanionAdSlot)

    Objective-C

    - (void)companionSlotWasClicked:(nonnull IMACompanionAdSlot *)slot;

    Parameters

    slot

    the IMACompanionAdSlot receiving the event