SASBidderAdapterProtocol

Objective-C

@protocol SASBidderAdapterProtocol <NSObject>

Swift

protocol SASBidderAdapterProtocol : NSObjectProtocol

A protocol to be implemented by bidder adapter classes to beneficiate of inapp in-app bidding and Holistic+ capabilities.

Adapter informations

Winning creative informations

  • The name of the winning SSP after bidder competition.

    Declaration

    Objective-C

    @property (nonatomic, strong) NSString *_Nonnull winningSSPName;

    Swift

    var winningSSPName: String { get set }
  • The winning creative ID.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSString *winningCreativeID;

    Swift

    var winningCreativeID: String? { get set }
  • The CPM value of the winner ad. Mandatory for true Price competition.

    Declaration

    Objective-C

    @property (nonatomic) float price;

    Swift

    var price: Float { get set }
  • The CPM currency of the winner ad. Mandatory for true Price competition.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSString *currency;

    Swift

    var currency: String? { get set }
  • The Smart Keywords if any available, nil otherwise. Mandatory for Keyword competition.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSString *keyword;

    Swift

    var keyword: String? { get set }
  • The Smart DealID if any available, nil otherwise.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSString *dealID;

    Swift

    var dealID: String? { get set }

Win notification callback

  • This method is called when Smart Display SDK did not return an ad with a better CPM than the bidder ad.

    Declaration

    Objective-C

    - (void)primarySDKLostBidCompetition;

    Swift

    func primarySDKLostBidCompetition()

Smart Display SDK Creative Rendering

  • Implements this method with the HTML markup to be displayed by Smart Display SDK when the winning creative is the one returned by the bidder.

    This markup is available in the documentation of each in-app bidding partner and often depends on several parameters, including the creative size.

    Declaration

    Objective-C

    - (nonnull NSString *)bidderWinningAdMarkup;

    Swift

    func bidderWinningAdMarkup() -> String
  • This method is called when the bidder’s winning ad is displayed, in case Smart Display SDK is responsible for creative rendering.

    You may perform actions when receiving this event, like counting impressions on your side, or trigger a new in-app bidding call, etc…

    Declaration

    Objective-C

    - (void)primarySDKDisplayedBidderAd;

    Swift

    func primarySDKDisplayedBidderAd()
  • This method is called when the bidder’s winning ad is clicked, in case the Smart Display SDK is responsible for creative rendering.

    You may perform action when receiving this event, like counting clicks on your side, etc…

    Declaration

    Objective-C

    - (void)primarySDKClickedBidderAd;

    Swift

    func primarySDKClickedBidderAd()

Third party Creative Rendering

  • This method is called when Smart Display SDK did not return an ad with a better CPM than the bidder ad.

    If rendering the ad is a third party responsibility, you should cascade the information, with all necessary parameters so that the winning ad is properly displayed.

    Declaration

    Objective-C

    - (void)primarySDKRequestedThirdPartyRendering;

    Swift

    func primarySDKRequestedThirdPartyRendering()

Bidder SDK Mediation Rendering - Banner

  • This method is called when Smart Display SDK is ready to display the banner ad of the Bidder SDK.

    You should add your ad view as a subview of the inputed view and forward all Bidder SDK events to the delegate.

    Declaration

    Objective-C

    - (void)loadBidderBannerAdInView:(nonnull UIView *)view
                            delegate:(nullable id<SASBannerBidderAdapterDelegate>)
                                         delegate;

    Swift

    func loadBidderBannerAd(in view: UIView, delegate: (any SASBannerBidderAdapterDelegate)?)

    Parameters

    view

    the view instanciated by the publisher, that should be the container of the winning ad.

    delegate

    to be informed about the ad view events, this delegate will also forward events to the publisher’s integration.

Bidder SDK Mediation Rendering - Interstitial

  • This method is called when Smart Display SDK is asking the Bidder SDK to load the interstitial ad.

    Declaration

    Objective-C

    - (void)loadBidderInterstitialWithDelegate:
        (nullable id<SASInterstitialBidderAdapterDelegate>)delegate;

    Swift

    func loadBidderInterstitial(with delegate: (any SASInterstitialBidderAdapterDelegate)?)

    Parameters

    delegate

    to be informed about the interstitial events, this delegate will also forward events to the publisher’s integration.

  • This method is called when Smart Display SDK is ready to display the interstitial ad of the Bidder SDK.

    Declaration

    Objective-C

    - (void)
        showBidderInterstitialFromViewController:
            (nonnull UIViewController *)viewController
                                        delegate:
                                            (nullable id<
                                                SASInterstitialBidderAdapterDelegate>)
                                                delegate;

    Swift

    func showBidderInterstitial(from viewController: UIViewController, delegate: (any SASInterstitialBidderAdapterDelegate)?)

    Parameters

    viewController

    the viewcontroller instance to be used as the presentor of the Insterstitial ad.

    delegate

    to be informed about the interstitial events, this delegate will also forward events to the publisher’s integration.

  • This method returns whether or not the interstitial ad is ready to be displayed

    Declaration

    Objective-C

    - (BOOL)isInterstitialAdReady;

    Swift

    func isInterstitialAdReady() -> Bool

    Return Value

    YES if interstitial ad is ready, NO otherwise;