PrebidAdUnit
@objcMembers
public class PrebidAdUnit : NSObject
Multiformat ad unit. Built for original API.
-
The ad slot identifier for the Prebid ad unit.
Declaration
Swift
public var pbAdSlot: String? { get set } -
Initializes a new
PrebidAdUnitwith the given configuration ID.Declaration
Swift
public init(configId: String)Parameters
configIdThe configuration ID for the ad unit.
-
Makes bid request for the specified ad object and request config. Setups targeting keywords into the adObject.
Declaration
Swift
public func fetchDemand( adObject: AnyObject, request: PrebidRequest, completion: @escaping (BidInfo) -> Void )Parameters
adObjectThe ad object to fetch demand for.
requestThe
PrebidRequestcontaining the demand request parameters.completionA closure to be called with the
BidInforesult. -
Makes bid request for the specified request config.
Declaration
Swift
public func fetchDemand(request: PrebidRequest, completion: @escaping (BidInfo) -> Void)Parameters
requestThe
PrebidRequestcontaining the demand request parameters.completionA closure to be called with the
BidInforesult.
-
Sets the view in which Prebid will start tracking an impression and activates the impression tracker.
Declaration
Swift
public func activatePrebidAdViewImpressionTracker(adView: UIView)Parameters
adViewThe ad view that contains ad creative(f.e. GAMBannerView). This object will be used later for tracking
burl. -
Activates interstitial impression tracker.
Declaration
Swift
public func activatePrebidInterstitialImpressionTracker()
-
Activates Prebid’s SKAdNetwork StoreKit ads flow for the provided ad view. Note: Ensure this method is called within the Google Mobile Ads ad received method (e.g., in the GADBannerViewDelegate’s bannerViewDidReceiveAd or similar callbacks).
Declaration
Swift
public func activatePrebidBannerSKAdNetworkStoreKitAdsFlow(adView: UIView)Parameters
adViewThe ad view that contains ad creative(f.e. GAMBannerView).
-
Activates Prebid’s SKAdNetwork StoreKit ads flow. Note: Ensure this method is called before presenting interstitials.
Declaration
Swift
public func activatePrebidInterstitialSKAdNetworkStoreKitAdsFlow()
-
This method allows to set the auto refresh period for the demand
Declaration
Swift
public func setAutoRefreshMillis(time: Double)Parameters
timerefresh time interval
-
This method stops the auto refresh of demand
Declaration
Swift
public func stopAutoRefresh() -
This method resumes the auto refresh of demand
Declaration
Swift
public func resumeAutoRefresh()
-
Attempts to display an
SKOverlayover interstitial if a valid configuration is available.Declaration
Swift
public func activateSKOverlayIfAvailable() -
Dismisses the SKOverlay if presented
Declaration
Swift
public func dismissSKOverlayIfAvailable()