PresentDelegate

public protocol PresentDelegate : AnyObject

Defines all presentation-related ad events.

Note

This protocol inherits from AnyObject so that the implementing objects are able to be referenced weakly.

  • Notifies when the ad was presented to the user.

    Declaration

    Swift

    func didPresent()
  • Notifies when the ad failed to be presented.

    Declaration

    Swift

    func failedToPresent(error: PresentError)

    Parameters

    error

    A PresentError object describing the error.

  • didRecordImpression(data:) Default implementation

    Notifies when the ad impression was recorded, returning an ImpressionData object.

    In the case of a Banner, this callback can be called multiple times, due to the banner autorefresh triggering more loads.

    For a Rewarded or an Interstitial ad, this callback will only be called once.

    Default Implementation

    Declaration

    Swift

    func didRecordImpression(data: ImpressionData)

    Parameters

    data

    An ImpressionData object describing the ad impression.

  • willDismiss() Default implementation

    Notifies when the ad is about to be dismissed.

    Default Implementation

    Declaration

    Swift

    func willDismiss()
  • Notifies when the ad was dismissed.

    Declaration

    Swift

    func didDismiss()
  • didClick() Default implementation

    Notifies when the ad was clicked.

    Default Implementation

    Declaration

    Swift

    func didClick()