PluginRendererFactory

@objcMembers
public class PluginRendererFactory : NSObject

A factory that resolves the appropriate plugin renderer for a given bid and creates banner views or interstitial controllers through it.

Callers should prepare the AdUnitConfig before invoking this factory. The factory only handles renderer resolution and SDK-renderer fallback, so caller-owned configuration such as banner size, interstitial flags, rewarded flags, video controls, and video parameters is preserved.

  • Creates a banner view using a caller-prepared ad unit configuration.

    Declaration

    Swift

    public static func createBannerView(
        with frame: CGRect,
        bid: Bid,
        adConfiguration: AdUnitConfig,
        loadingDelegate: DisplayViewLoadingDelegate,
        interactionDelegate: DisplayViewInteractionDelegate
    ) -> PrebidMobileDisplayViewProtocol?

    Parameters

    frame

    The frame for the banner view.

    bid

    The bid containing renderer preference metadata.

    adConfiguration

    Prepared ad unit configuration.

    loadingDelegate

    Delegate for ad loading events.

    interactionDelegate

    Delegate for ad interaction events.

    Return Value

    A banner view conforming to PrebidMobileDisplayViewProtocol, or nil on failure.

  • Creates an interstitial controller using a caller-prepared ad unit configuration.

    Declaration

    Swift

    public static func createInterstitialController(
        bid: Bid,
        adConfiguration: AdUnitConfig,
        loadingDelegate: InterstitialControllerLoadingDelegate,
        interactionDelegate: InterstitialControllerInteractionDelegate
    ) -> PrebidMobileInterstitialControllerProtocol?

    Parameters

    bid

    The bid containing renderer preference metadata.

    adConfiguration

    Prepared ad unit configuration.

    loadingDelegate

    Delegate for interstitial loading events.

    interactionDelegate

    Delegate for interstitial interaction events.

    Return Value

    An interstitial controller conforming to PrebidMobileInterstitialControllerProtocol, or nil on failure.