PrebidMobilePluginRenderer
@objc
public protocol PrebidMobilePluginRenderer
A protocol for the plugin renderer, defining the basic interface that any renderer should implement. This protocol provides the ability to retrieve plugin details, support rendering formats, and manage event delegates and methods for creating custom banner view and insterstitial controller.
-
The name of the plugin renderer. This is used to identify the plugin.
Declaration
Swift
@objc var name: String { get }
-
The version of the plugin renderer.
Declaration
Swift
@objc var version: String { get }
-
Custom data to be included in the ORTB request.
Declaration
Swift
@objc var data: [String : Any]? { get }
-
Register a listener related to a specific ad unit config fingerprint in order to dispatch specific ad events.
Declaration
Swift
@objc optional func registerEventDelegate( pluginEventDelegate: PluginEventDelegate, adUnitConfigFingerprint: String )
-
Unregister a listener related to a specific ad unit config fingerprint in order to dispatch specific ad events.
Declaration
Swift
@objc optional func unregisterEventDelegate( pluginEventDelegate: PluginEventDelegate, adUnitConfigFingerprint: String )
-
Creates and returns an ad view conforming to
PrebidMobileDisplayViewManagerProtocol
for a given bid response. Returns nil in the case of an internal error or if no renderer is provided.Declaration
Swift
@objc func createBannerView( with frame: CGRect, bid: Bid, adConfiguration: AdUnitConfig, loadingDelegate: DisplayViewLoadingDelegate, interactionDelegate: DisplayViewInteractionDelegate ) -> (UIView & PrebidMobileDisplayViewProtocol)?
Parameters
frame
The frame specifying the initial size and position of the ad view.
bid
The
Bid
object containing the bid response used for rendering the ad.adConfiguration
The
AdUnitConfig
instance providing configuration details for the ad unit.loadingDelegate
The delegate conforming to
DisplayViewLoadingDelegate
for handling ad loading events.interactionDelegate
The delegate conforming to
DisplayViewInteractionDelegate
for handling ad interaction events. -
Creates and returns an implementation of
PrebidMobileInterstitialControllerProtocol
for a given bid response. Returns nil in the case of an internal error or if no renderer is provided.Declaration
Swift
@objc func createInterstitialController( bid: Bid, adConfiguration: AdUnitConfig, loadingDelegate: InterstitialControllerLoadingDelegate, interactionDelegate: InterstitialControllerInteractionDelegate ) -> PrebidMobileInterstitialControllerProtocol?
Parameters
bid
The
Bid
object containing the bid response used for rendering the interstitial ad.adConfiguration
The
AdUnitConfig
instance providing configuration details for the ad unit.loadingDelegate
The delegate for handling interstitial ad loading events.
interactionDelegate
The delegate for handling user interactions with the interstitial ad.
-
jsonDictionary()
Extension methodUndocumented
Declaration
Swift
public func jsonDictionary() -> [String : Any]