GAMNativeBannerEventHandler Class Reference

Inherits from NSObject
Conforms to POBBannerEvent
Declared in GAMNativeBannerEventHandler.h

Overview

This class manages GAM’s Native + Banner combined header bidding requests using AdLoader and listens to the respective callbacks. It also communicates with the OpenWrap SDK, via POBBannerEvent delegate, to inform the GAM banner ad events. Native/custom native ad callbacks are provided through specific delegates POBGAMNativeAdDelegate or POBGAMCustomNativeAdDelegate, while banner ad events are provided through POBBannerViewDelegate as usual. Note: You must set up banner demand, in addition to native and/or custom native, to include OW banner bids Reference: https://developers.google.com/ad-manager/mobile-ads-sdk/ios/native-banner

– initWithAdUnitId:adTypes:options:andSizes:

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

- (instancetype)initWithAdUnitId:(NSString *)adUnitId adTypes:(nonnull NSArray<GADAdLoaderAdType> *)adTypes options:(nullable NSArray<GADAdLoaderOptions*> *)options andSizes:(NSArray<NSValue*> *)validSizes

Parameters

adUnitId

GAM ad unit id

adTypes

An array of GADAdLoaderAdType

options

An array of GADAdLoaderOptions objects to configure how ads are loaded, or nil to use default options

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;

Return Value

Instance of GAMNativeEventHandler

Discussion

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

Declared In

GAMNativeBannerEventHandler.h

  nativeDelegate

Delegate object conforming to POBGAMNativeAdDelegate protocol

@property (nonatomic, weak) id<POBGAMNativeAdDelegate> nativeDelegate

Declared In

GAMNativeBannerEventHandler.h

  customNativeDelegate

Delegate object conforming to POBGAMCustomNativeAdDelegate protocol

@property (nonatomic, weak) id<POBGAMCustomNativeAdDelegate> customNativeDelegate

Declared In

GAMNativeBannerEventHandler.h

  configBlock

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

@property (nonatomic, copy) GAMNativeBannerConfigBlock configBlock

Discussion

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

Declared In

GAMNativeBannerEventHandler.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

GAMNativeBannerEventHandler.h