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

SKAdNetwork

  • 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

    adView

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

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

SKOverlay

  • Attempts to display an SKOverlay over interstitial if a valid configuration is available.

    Declaration

    Swift

    public func activateSKOverlayIfAvailable()
  • Dismisses the SKOverlay if presented

    Declaration

    Swift

    public func dismissSKOverlayIfAvailable()