POBNativeAd Protocol Reference

Conforms to NSObject
Declared in POBNativeAd.h

– setAdDelegate: required method

Sets delegate for receiving the ad workflow events

- (void)setAdDelegate:(id<POBNativeAdDelegate>)delegate

Parameters

delegate

POBNativeAdDelegate delegate to get Native ad events

Declared In

POBNativeAd.h

– setVideoDelegate: required method

Sets delegate for receiving the native video ad events

- (void)setVideoDelegate:(id<POBNativeAdVideoDelegate>)delegate

Parameters

delegate

POBNativeAdVideoDelegate delegate to get Native video ad events

Discussion

Sets delegate for receiving the native video ad events

Declared In

POBNativeAd.h

– adView required method

Getter for rendered native ad view. This view needs to be attached to the screen.

- (POBNativeAdView *)adView

Return Value

Instance of POBNativeAdView

Declared In

POBNativeAd.h

– adInfoIconView required method

Getter for the ad info icon view.

- (nullable UIImageView *)adInfoIconView

Return Value

Instance of UIImageView.

Declared In

POBNativeAd.h

– mediaView required method

Getter for the media view.

- (UIView *)mediaView

Discussion

Getter for the media view.

Declared In

POBNativeAd.h

– mediaAspectRatio required method

Getter for the media aspect ratio. The value is 0 when there’s no media content or the media content aspect ratio is unknown. @Note: This method should be called after the ad has been rendered to ensure accurate aspect ratio. Calling this method during the bidding flow may not return the accurate aspect ratio.

- (CGFloat)mediaAspectRatio

Return Value

Aspect ratio of the media view.

Discussion

Getter for the media aspect ratio. The value is 0 when there’s no media content or the media content aspect ratio is unknown. @Note: This method should be called after the ad has been rendered to ensure accurate aspect ratio. Calling this method during the bidding flow may not return the accurate aspect ratio.

Declared In

POBNativeAd.h

– titleAsset required method

Getter for the native ad title asset

- (POBNativeAdTitleResponseAsset *)titleAsset

Return Value

Instance of POBNativeAdTitleResponseAsset

Declared In

POBNativeAd.h

– descriptionAsset required method

Getter for the native ad description asset

- (POBNativeAdDataResponseAsset *)descriptionAsset

Return Value

Instance of POBNativeAdDataResponseAsset

Declared In

POBNativeAd.h

– ratingAsset required method

Getter for the native ad rating asset

- (POBNativeAdDataResponseAsset *)ratingAsset

Return Value

Instance of POBNativeAdDataResponseAsset

Declared In

POBNativeAd.h

– priceAsset required method

Getter for the native ad price asset

- (POBNativeAdDataResponseAsset *)priceAsset

Return Value

Instance of POBNativeAdDataResponseAsset

Declared In

POBNativeAd.h

– advertiserAsset required method

Getter for the native ad advertiser asset

- (POBNativeAdDataResponseAsset *)advertiserAsset

Return Value

Instance of POBNativeAdDataResponseAsset

Declared In

POBNativeAd.h

– callToActionAsset required method

Getter for the native ad call to action asset

- (POBNativeAdDataResponseAsset *)callToActionAsset

Return Value

Instance of POBNativeAdDataResponseAsset

Declared In

POBNativeAd.h

– iconAsset required method

Getter for the native ad icon asset

- (POBNativeAdImageResponseAsset *)iconAsset

Return Value

Instance of POBNativeAdImageResponseAsset

Declared In

POBNativeAd.h

– mainImageAsset required method

Getter for the native ad main image asset

- (POBNativeAdImageResponseAsset *)mainImageAsset

Return Value

Instance of POBNativeAdImageResponseAsset

Declared In

POBNativeAd.h

– titleAssetWithId: required method

Returns title asset for the respective identifier

- (POBNativeAdTitleResponseAsset *)titleAssetWithId:(NSInteger)identifier

Parameters

identifier

Identifier of the title asset

Return Value

Instance of POBNativeAdTitleResponseAsset

Declared In

POBNativeAd.h

– dataAssetWithId: required method

Returns data asset for the respective identifier

- (POBNativeAdDataResponseAsset *)dataAssetWithId:(NSInteger)identifier

Parameters

identifier

Identifier of the data asset

Return Value

Instance of POBNativeAdDataResponseAsset

Declared In

POBNativeAd.h

– imageAssetWithId: required method

Returns image asset for the respective identifier

- (POBNativeAdImageResponseAsset *)imageAssetWithId:(NSInteger)identifier

Parameters

identifier

Identifier of the image asset

Return Value

Instance of POBNativeAdImageResponseAsset

Declared In

POBNativeAd.h

– renderAdWithCompletion: required method

Renders a native ad

- (void)renderAdWithCompletion:(POBNativeAdRenderingCompletionBlock)completion

Parameters

completion

completion block

Declared In

POBNativeAd.h

– renderAdWithTemplateView:andCompletion: required method

Renders the native ad with block for native ad rendering customizations

- (void)renderAdWithTemplateView:(POBNativeTemplateView *)templateview andCompletion:(POBNativeAdRenderingCompletionBlock)completion

Parameters

templateview

POBNativeTemplateView with customized layout and appearance.

completion

Rendering completion block for native ads

Declared In

POBNativeAd.h

– registerViewForInteractions:clickableViews: required method

Registers the rendered views for tracking impression/clicks

- (void)registerViewForInteractions:(UIView *)adView clickableViews:(NSArray<UIView*> *)clickableViews

Parameters

adView

UIView representing the native ad

clickableViews

clickable asset views

Declared In

POBNativeAd.h