AI-generated Key Takeaways
-
The
IMACompanionDelegate
protocol enables you to receive events from companion ad slots, like whether an ad successfully filled the slot or not. -
It also allows you to know when a user clicks on a companion ad slot and navigates away.
-
Developers can implement these optional methods to gain insight into companion ad interactions and behavior in their apps.
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