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 PrebidAdUnit with the given configuration ID.

    Declaration

    Swift

    public init(configId: String)

    Parameters

    configId

    The 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

    adObject

    The ad object to fetch demand for.

    request

    The PrebidRequest containing the demand request parameters.

    completion

    A closure to be called with the BidInfo result.

  • Makes bid request for the specified request config.

    Declaration

    Swift

    public func fetchDemand(request: PrebidRequest, completion: @escaping (BidInfo) -> Void)

    Parameters

    request

    The PrebidRequest containing the demand request parameters.

    completion

    A closure to be called with the BidInfo result.

Prebid Impression Tracking

  • Sets the view in which Prebid will start tracking an impression and activates the impression tracker.

    Declaration

    Swift

    public func activatePrebidAdViewImpressionTracker(adView: UIView)

    Parameters

    adView

    The 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()

Auto refresh API

  • This method allows to set the auto refresh period for the demand

    Declaration

    Swift

    public func setAutoRefreshMillis(time: Double)

    Parameters

    time

    refresh 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()