MPNativeAd /5.0.0

@interface MPNativeAd : NSObject <MPMoPubAd>

The MPNativeAd class is used to render and manage events for a native advertisement. The class provides methods for accessing native ad properties returned by the server, as well as convenience methods for URL navigation and metrics-gathering.

Public Constants

extern NSString const /kAdTitleKey /+5.0.0

  • Declaration:

    extern NSString *const kAdTitleKey

Public Properties

Ad Resources

MPNativeAdDelegate /delegate /+5.0.0

  • Description: The delegate of the MPNativeAd object.

  • Declaration:

    @property (readwrite, nonatomic) id<MPNativeAdDelegate> delegate;
  • Parameters: None.

NSDictionary/properties /+5.0.0

  • Description: A dictionary representing the native ad properties.

  • Declaration:

    @property (readonly, nonatomic) NSDictionary *properties;
  • Parameters: None.

Public Methods

Retrieving Ad View

-/retrieveAdViewWithError: /+5.0.0

  • Description: Retrieves a rendered view containing the ad.

  • Declaration:

    - (UIView *)retrieveAdViewWithError:(NSError **)error;
  • Parameters:

    • error: A pointer to an error object. If an error occurs, this pointer will be set to an actual error object containing the error information.

Last updated August 28, 2021

TWITTER, MOPUB, and the Bird logo are trademarks of Twitter, Inc. or its affiliates. All third party logos and trademarks included are the property of their respective owners.

© 2021 MoPub (a division of Twitter, Inc.)