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.

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