POBBannerView Class Reference

Inherits from UIView
Conforms to POBBidEvent
Declared in POBBannerView.h

Overview

The view class that displays the banner ad.

It renders a banner ad from either the ad server SDK or openwrap partner whichever gets a chance in the auction.

To request banner ad, your delegate must conform to POBBannerViewDelegate, to pass mandatory UIViewController using

  • (UIViewController * _Nonnull)bannerViewPresentationController;

– initWithPublisherId:profileId:adUnitId:eventHandler:

Initializes & returns a newly allocated banner view object.

- (instancetype _Nullable)initWithPublisherId:(NSString *)publisherId profileId:(NSNumber *)profileId adUnitId:(NSString *)adUnitId eventHandler:(id<POBBannerEvent>)eventHandler

Parameters

publisherId

Unique identifier assigned at the time of publisher onboarding.

profileId

Profile id of the ad tag.

adUnitId

Ad unit id used to identify unique placement on screen.

eventHandler

Object conforming to POBBannerEvent protocol

Return Value

Instance of POBBannerView

Declared In

POBBannerView.h

– initWithPublisherId:profileId:adUnitId:adSizes:

Initializes & returns a newly allocated banner view object for supporting ‘No Ad Server Configuration’.

- (instancetype _Nullable)initWithPublisherId:(NSString *)publisherId profileId:(NSNumber *)profileId adUnitId:(NSString *)adUnitId adSizes:(NSArray<POBAdSize*> *)adSizes

Parameters

publisherId

Unique identifier assigned at the time of publisher onboarding.

profileId

Profile id of the ad tag.

adUnitId

Ad unit id used to identify unique placement on screen.

adSizes

List of banner ad sizes for this impression

Return Value

Instance of POBBannerView

Declared In

POBBannerView.h

– loadAd

Initiates the loading of the banner ad

- (void)loadAd

Declared In

POBBannerView.h

– loadAdWithResponse:

Initiate the loading of a banner ad, with the passed bid response.

- (void)loadAdWithResponse:(NSString *)bidResponse

Parameters

bidResponse

Response string as per Open-RTB standard.

Discussion

This API expects the response with ORTB v2.5 specification.

Declared In

POBBannerView.h

– pauseAutoRefresh

Pauses the auto refresh, By default, banner refreshes automatically as per configured refresh interval on openwrap portal. Calling this method prevents the refresh cycle to happen even if a refresh interval has been specified.

- (void)pauseAutoRefresh

Discussion

Pauses the auto refresh, By default, banner refreshes automatically as per configured refresh interval on openwrap portal. Calling this method prevents the refresh cycle to happen even if a refresh interval has been specified.

It is recommended to use this method whenever the ad view is about to be hidden from the user for any period of time, to avoid unnecessary ad requests. You can then call resumeAutoRefresh to resume the refresh when banner becomes visible.

Declared In

POBBannerView.h

– resumeAutoRefresh

Resumes the autorefresh as per configured refresh interval on openwrap portal, call this method only if you have previously paused autorefresh using pauseAutoRefresh. This method has no effect if a refresh interval has not been set.

- (void)resumeAutoRefresh

Discussion

Resumes the autorefresh as per configured refresh interval on openwrap portal, call this method only if you have previously paused autorefresh using pauseAutoRefresh. This method has no effect if a refresh interval has not been set.

Declared In

POBBannerView.h

– forceRefresh

Cancels existing ad requests and initiates new ad request

- (BOOL)forceRefresh

Return Value

Status YES/NO, about force refresh, as described it can skip in few cases by returning ‘NO’

Discussion

Warning: It may skip force refresh if ad creative is being loaded, user interacting with ad (Opening Internal browser or expanding ad) or waiting response from ad server SDK if applicable.

Declared In

POBBannerView.h

  delegate

Sets the POBBannerViewDelegate receiver for the ad view.

@property (nonatomic, weak) id<POBBannerViewDelegate> _Nullable delegate

Discussion

Warning: Proper reference management practices should be observed when using delegates.

Warning: Ensure that the delegate is set to nil prior to setting nil to banner view’s object reference.

Declared In

POBBannerView.h

  request

Object representing bid request

@property (nonatomic, readonly) POBRequest *request

Discussion

You may set some additional targeting parameters on this object

See Also

Declared In

POBBannerView.h

  impression

Managed impression object created internally. It provides APIs to set pubmatic zone id and other custom parameters.

@property (nonatomic, readonly) POBImpression *impression

Declared In

POBBannerView.h

– creativeSize

Size of the rendered ad creative

- (POBAdSize *)creativeSize

Declared In

POBBannerView.h

– bid

Returns the winning bid that will be used to render the ad

- (POBBid *)bid

Declared In

POBBannerView.h