MediationBannerAdUnit
@objcMembers
public class MediationBannerAdUnit : NSObject
This class is responsible for making bid request and providing the winning bid and targeting keywords to mediating SDKs. This class is a part of Mediation API.
-
Property that performs certain utilty work for the
MediationBannerAdUnitDeclaration
Swift
public let mediationDelegate: PrebidMediationDelegate
-
The configuration ID for an ad unit
Declaration
Swift
public var configID: String { get } -
The ad format for the ad unit.
Declaration
Swift
public var adFormat: AdFormat { get set } -
The position of the ad on the screen.
Declaration
Swift
public var adPosition: AdPosition { get set } -
Parameters for configuring banner ads.
Declaration
Swift
public var bannerParameters: BannerParameters { get } -
Parameters for configuring video ads.
Declaration
Swift
public var videoParameters: VideoParameters { get } -
The refresh interval for the ad.
Declaration
Swift
public var refreshInterval: TimeInterval { get set } -
Additional sizes for the ad unit.
Declaration
Swift
public var additionalSizes: [CGSize]? { get set }
-
Sets the impression-level OpenRTB configuration string for the ad unit.
Declaration
Swift
public func setImpORTBConfig(_ ortbConfig: String?)Parameters
ortbConfigThe impression-level OpenRTB configuration string to set. Can be
nilto clear the configuration. -
Returns the impression-level OpenRTB configuration string.
Declaration
Swift
public func getImpORTBConfig() -> String? -
Sets the global OpenRTB configuration string for the ad unit. It takes precedence over
Targeting.setGlobalOrtbConfig.Declaration
Swift
public func setGlobalORTBConfig(_ ortbConfig: String?)Parameters
ortbConfigThe global OpenRTB configuration string to set. Can be
nilto clear the configuration. -
Returns the global OpenRTB configuration string.
Declaration
Swift
public func getGlobalORTBConfig() -> String?
-
Initializes a new mediation banner ad unit with the specified configuration ID, size, and mediation delegate.
Declaration
Swift
public init(configID: String, size: CGSize, mediationDelegate: PrebidMediationDelegate)Parameters
configIDThe unique identifier for the ad unit configuration.
sizeThe size of the ad.
mediationDelegateThe delegate for handling mediation.
-
Makes bid request and setups mediation parameters.
Declaration
Swift
public func fetchDemand(completion: ((ResultCode) -> Void)?)Parameters
completionThe completion handler to call when the demand fetch is complete.
-
Stops the auto-refresh for the ad unit.
Declaration
Swift
public func stopRefresh() -
Handles the event when the ad object fails to load an ad.
Declaration
Swift
public func adObjectDidFailToLoadAd(adObject: UIView, with error: Error)Parameters
adObjectThe ad object that failed to load the ad.
errorThe error that occurred during the ad load.