LoadDelegate

public protocol LoadDelegate : AnyObject

Defines all load-related ad events.

Note

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

  • didCompletePrebidding(result:) Default implementation

    Notifies when the prebidding call finished.

    Default Implementation

    Declaration

    Swift

    func didCompletePrebidding(result: PrebiddingResults)

    Parameters

    result

    A PrebiddingResults object describing the result of the prebid call.

  • Notifies when the ad was loaded successfully.

    In the case of a Banner, this callback can be called multiple times, due to the banner autorefresh triggering more loads. The first time, the delegate should add the view to the hierarchy if it hadn’t been added yet.

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

    Declaration

    Swift

    func didLoad(result: LoadResult)

    Parameters

    result

    A LoadResult object describing the result of the load call.

  • Notifies when the ad failed to load.

    Declaration

    Swift

    func failedToLoad(result: LoadResult?, error: LoadError)

    Parameters

    result

    A LoadResult object describing the result of the load call. result will have a value only if the error was a noFill.

    error

    A LoadError object describing the error of the load call.