iOS Verizon Ads SDK Standard Edition Documentation  1.14
Instance Methods | Properties | List of all members
VASNativeAd Class Reference

VASNativeAd is a placement used for ads that are a collection of assets that can be individually laid out in a way that looks and feels like the application. More...

#import <VASNativeAd.h>

Instance Methods

(nullable id< VASComponent >) - component:
 Returns a VASComponent for the specified component identifier. More...
 
(void) - destroy
 Destroys the VASNativeAd and frees all associated resources and removes all requested VASTextView and VASDisplayMediaView views. More...
 
(void) - invokeDefaultAction
 Performs the default action for the ad. More...
 
(BOOL- registerContainerView:
 Register a view for tracking using the Open Measurement SDK. More...
 

Properties

NSStringadType
 The VASNativeAd type, or nil if the ad has been destroyed.
 
NSSet< NSString * > * componentIds
 The component IDs that are found on this ad.
 
VASCreativeInfocreativeInfo
 A VASCreativeInfo object containing identifiers for the ad's creative and its demand source, if available.
 
id< VASNativeAdDelegatedelegate
 The object implementing the VASNativeAdDelegate protocol, to receive native ad callbacks.
 
NSDictionary< NSString *, id > * JSON
 A sanitized copy of the native ad JSON that can be queried for things like ad properties and metadata.
 
NSStringplacementId
 The placementId for the VASNativeAd. More...
 
NSSet< NSString * > * requiredComponentIds
 The component IDs that are required for this ad. More...
 

Detailed Description

VASNativeAd is a placement used for ads that are a collection of assets that can be individually laid out in a way that looks and feels like the application.

Method Documentation

◆ component:

- (nullable id<VASComponent>) component: (NSString *)  componentId

Returns a VASComponent for the specified component identifier.

This method must be called on the main thread.

Parameters
componentIdThe component identifier for retrieving the VASComponent.
Returns
a VASComponent object.

◆ destroy

- (void) destroy

Destroys the VASNativeAd and frees all associated resources and removes all requested VASTextView and VASDisplayMediaView views.

After the ad has been destroyed, the VASNativeAd instance is no longer usable. This method must be called on the main thread.

◆ invokeDefaultAction

- (void) invokeDefaultAction

Performs the default action for the ad.

This method should be called when the user interacts with an ad in a manner that is not captured by the built in click listeners, and the publisher intends for the interaction to represent ad interaction. Examples of non typical ad interaction captured by the publisher would be a user gesture, voice trigger or other uncaptured behavior.

◆ registerContainerView:

- (BOOL) registerContainerView: (UIView *)  containerView

Register a view for tracking using the Open Measurement SDK.

This view should contain all required component views for the native ad. This method must be called on the main thread.

Parameters
containerViewThe UIView containing the native ad's component views.
Returns
YES if the Open Measurement SDK started tracking the containerView successfully, otherwise NO.

Property Documentation

◆ placementId

- (NSString*) placementId
readatomiccopy

The placementId for the VASNativeAd.

Will be nil after the ad is destroyed.

◆ requiredComponentIds

- (NSSet<NSString *>*) requiredComponentIds
readatomiccopy

The component IDs that are required for this ad.

A subset of the componentIds property.