DFPBannerEventHandler Class Reference

Inherits from NSObject
Conforms to POBBannerEvent
Declared in DFPBannerEventHandler.h

Overview

This class is responsible for communication between OpenWrap banner view and DFP banner view. It implements the POBBannerEvent protocol. it notifies event back to OpenWrap SDK using POBBannerEventDelegate methods

– initWithAdUnitId:andSizes:

Initializes and returns a event handler with the specified DFP ad unit and ad sizes

- (instancetype)initWithAdUnitId:(NSString *)adUnitId andSizes:(NSArray *)validSizes

Parameters

adUnitId

DFP ad unit id

validSizes

Array of NSValue encoded GADAdSize structs. Never create your own GADAdSize directly. Use one of the predefined standard ad sizes (such as GADAdSizeBanner), or create one using the GADAdSizeFromCGSize method. Example:

NSArray *validSizes = @[
NSValueFromGADAdSize(GADAdSizeBanner),
NSValueFromGADAdSize(GADAdSizeLargeBanner)
];
bannerView.validAdSizes = validSizes;

Discussion

Initializes and returns a event handler with the specified DFP ad unit and ad sizes

Declared In

DFPBannerEventHandler.h

– initWithAdUnitId:gamAdSize:owAdSizes:

Initializes and returns an event handler instance with GAM ad unit and ad size. Use this initializer to request adaptive sizes from GAM.

- (instancetype)initWithAdUnitId:(NSString *)adUnitId gamAdSize:(GADAdSize)gamAdSize owAdSizes:(NSArray<POBAdSize*> *)owAdSizes

Parameters

adUnitId

GAM ad unit id

gamAdSize

GADAdSize to be used for GAM ad request. You may also use an adaptive size here.

owAdSizes

Array of POBAdSizes to be used for OpenWrap ad request

Declared In

DFPBannerEventHandler.h

– setValidGAMAdSizes:

Optional API to set valid ad sizes for the GAM ad request. Array of NSValue encoded GADAdSize structs. Never create your own GADAdSize directly. Use one of the predefined standard ad sizes (such as GADAdSizeBanner), or create one using the GADAdSizeFromCGSize method. Example:

NSArray *validSizes = @[
NSValueFromGADAdSize(GADAdSizeBanner),
NSValueFromGADAdSize(GADAdSizeLargeBanner)
];
bannerView.validAdSizes = validSizes;
- (void)setValidGAMAdSizes:(NSArray<NSValue*> *)validGAMAdSizes

Parameters

validGAMAdSizes

array of GADAdSizes to be used for GAM ad request

Declared In

DFPBannerEventHandler.h

  configBlock

A configBlock that is called before event handler makes ad request call to DFP SDK. It passes GAMBannerView & GAMRequest which will be used to make ad request.

@property (nonatomic, copy) DFPBannerConfigBlock configBlock

Discussion

A configBlock that is called before event handler makes ad request call to DFP SDK. It passes GAMBannerView & GAMRequest which will be used to make ad request.

Declared In

DFPBannerEventHandler.h

  appEventDelegate

Delegate object which is used to provide GAM app event callback

@property (nonatomic, weak) id<POBGAMAppEventDelegate> appEventDelegate

Discussion

Delegate object which is used to provide GAM app event callback

Declared In

DFPBannerEventHandler.h