SASMediationBannerAdapterDelegate

Objective-C

@protocol SASMediationBannerAdapterDelegate <NSObject>

Swift

protocol SASMediationBannerAdapterDelegate : NSObjectProtocol

SASMediationBannerAdapter delegate.

  • The modal parent view controller of the current banner if any, nil otherwise.

    Warning

    Do not cache this value as its value could change during the adapter lifetime.

    Declaration

    Objective-C

    @property (readonly, nullable) UIViewController *modalParentViewController;

    Swift

    var modalParentViewController: UnsafeMutablePointer<Int32>? { get }
  • Called when the underlying mediation ad has loaded successfully.

    Declaration

    Objective-C

    - (void)mediationBannerAdapter:
                (nonnull id<SASMediationBannerAdapter>)mediationBannerAdapter
         didLoadAdWithMediatedView:(nonnull UIView *)mediatedView
                             width:(nullable NSNumber *)width
                            height:(nullable NSNumber *)height;

    Swift

    func mediationBannerAdapter(_ mediationBannerAdapter: any SASMediationBannerAdapter, didLoadAdWithMediatedView mediatedView: Any!, width: NSNumber?, height: NSNumber?)

    Parameters

    mediationBannerAdapter

    The instance of SASMediationBannerAdapter calling the delegate.

    mediatedView

    The third party view displaying the ad.

    width

    The width of the loaded ad if available, nil otherwise.

    height

    The height of the loaded ad if available, nil otherwise.

  • Called when the underlying mediation ad has failed to load.

    Declaration

    Objective-C

    - (void)mediationBannerAdapter:
                (nonnull id<SASMediationBannerAdapter>)mediationBannerAdapter
            didFailToLoadWithError:(nonnull NSError *)error
                            noFill:(BOOL)noFill;

    Swift

    func mediationBannerAdapter(_ mediationBannerAdapter: any SASMediationBannerAdapter, didFailToLoadWithError error: any Error, noFill: Bool)

    Parameters

    mediationBannerAdapter

    The instance of SASMediationBannerAdapter calling the delegate.

    error

    The error preventing the underlying mediation ad from being loaded.

    noFill

    YES if the ad could not be loaded because of ‘no ad / no fill’, NO for any other loading error.

  • Called when the underlying mediation ad has been clicked.

    Declaration

    Objective-C

    - (void)mediationBannerAdapterDidReceiveAdClickEvent:
        (nonnull id<SASMediationBannerAdapter>)mediationBannerAdapter;

    Swift

    func mediationBannerAdapterDidReceiveAdClickEvent(_ mediationBannerAdapter: any SASMediationBannerAdapter)

    Parameters

    mediationBannerAdapter

    The instance of SASMediationBannerAdapter calling the delegate.

  • Called when the underlying mediation ad has expanded.

    Declaration

    Objective-C

    - (void)mediationBannerAdapterDidReceiveAdExpandEvent:
        (nonnull id<SASMediationBannerAdapter>)mediationBannerAdapter;

    Swift

    func mediationBannerAdapterDidReceiveAdExpandEvent(_ mediationBannerAdapter: any SASMediationBannerAdapter)

    Parameters

    mediationBannerAdapter

    The instance of SASMediationBannerAdapter calling the delegate.

  • Called when the underlying mediation ad has collapsed.

    Declaration

    Objective-C

    - (void)mediationBannerAdapterDidReceiveAdCollapseEvent:
        (nonnull id<SASMediationBannerAdapter>)mediationBannerAdapter;

    Swift

    func mediationBannerAdapterDidReceiveAdCollapseEvent(_ mediationBannerAdapter: any SASMediationBannerAdapter)

    Parameters

    mediationBannerAdapter

    The instance of SASMediationBannerAdapter calling the delegate.