SASMediationBannerAdapter

Objective-C

@protocol SASMediationBannerAdapter <NSObject>

Swift

protocol SASMediationBannerAdapter : NSObjectProtocol

Protocol that must be implemented by mediation adapters that load and return banner ads.

  • Initialize a new instance of the banner adapter with an adapter delegate.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithDelegate:
        (nonnull id<SASMediationBannerAdapterDelegate>)delegate;

    Swift

    init(delegate: any SASMediationBannerAdapterDelegate)

    Parameters

    delegate

    An instance of the delegate you will use to provide information to Smart SDK.

    Return Value

    An initialized instance of the banner adapter.

  • Requests a mediated banner ad asynchronously.

    Use the delegate provided in the init method to inform the SDK about the loading status of the ad.

    Declaration

    Objective-C

    - (void)requestBannerWithServerParameterString:
                (nonnull NSString *)serverParameterString
                                  clientParameters:
                                      (nonnull NSDictionary *)clientParameters
                                    viewController:
                                        (nonnull UIViewController *)viewController;

    Swift

    func requestBanner(withServerParameterString serverParameterString: String, clientParameters: [AnyHashable : Any], viewController: UIViewController)

    Parameters

    serverParameterString

    A string containing all needed parameters (as returned by Smart ad delivery) to make the mediation ad call.

    clientParameters

    Additional client-side parameters (see SASMediationAdapterConstants.h for an exhaustive list).

    viewController

    The view controller currently displayed on screen, in which the banner will be displayed.