# GoogleMobileAds Framework Reference

# GADMediatedUnifiedNativeAd

    @protocol GADMediatedUnifiedNativeAd <NSObject>

Provides methods used for constructing native ads. The adapter must return an object conforming
to this protocol for native ad requests.
- `


  ### [headline](https://developers.google.com/admob/ios/api/reference/Protocols/GADMediatedUnifiedNativeAd#/c:objc(pl)GADMediatedUnifiedNativeAd(py)headline)


  ` Headline.

  #### Declaration

  Swift

      var headline: String? { get }

  Objective-C

      @property (nonatomic, copy, readonly, nullable) NSString *headline;

- `


  ### [images](https://developers.google.com/admob/ios/api/reference/Protocols/GADMediatedUnifiedNativeAd#/c:objc(pl)GADMediatedUnifiedNativeAd(py)images)


  ` Array of GADNativeAdImage objects.

  #### Declaration

  Swift

      var images: [NativeAdImage]? { get }

  Objective-C

      @property (nonatomic, readonly, nullable) NSArray<https://developers.google.com/admob/ios/api/reference/Classes/GADNativeAdImage.html *> *images;

- `


  ### [body](https://developers.google.com/admob/ios/api/reference/Protocols/GADMediatedUnifiedNativeAd#/c:objc(pl)GADMediatedUnifiedNativeAd(py)body)


  ` Description.

  #### Declaration

  Swift

      var body: String? { get }

  Objective-C

      @property (nonatomic, copy, readonly, nullable) NSString *body;

- `


  ### [icon](https://developers.google.com/admob/ios/api/reference/Protocols/GADMediatedUnifiedNativeAd#/c:objc(pl)GADMediatedUnifiedNativeAd(py)icon)


  ` Icon image.

  #### Declaration

  Swift

      var icon: NativeAdImage? { get }

  Objective-C

      @property (nonatomic, readonly, nullable) https://developers.google.com/admob/ios/api/reference/Classes/GADNativeAdImage.html *icon;

- `


  ### [callToAction](https://developers.google.com/admob/ios/api/reference/Protocols/GADMediatedUnifiedNativeAd#/c:objc(pl)GADMediatedUnifiedNativeAd(py)callToAction)


  ` Text that encourages user to take some action with the ad. For example "Install".

  #### Declaration

  Swift

      var callToAction: String? { get }

  Objective-C

      @property (nonatomic, copy, readonly, nullable) NSString *callToAction;

- `


  ### [starRating](https://developers.google.com/admob/ios/api/reference/Protocols/GADMediatedUnifiedNativeAd#/c:objc(pl)GADMediatedUnifiedNativeAd(py)starRating)


  ` App store rating (0 to 5).

  #### Declaration

  Swift

      @NSCopying var starRating: NSDecimalNumber? { get }

  Objective-C

      @property (nonatomic, copy, readonly, nullable) NSDecimalNumber *starRating;

- `


  ### [store](https://developers.google.com/admob/ios/api/reference/Protocols/GADMediatedUnifiedNativeAd#/c:objc(pl)GADMediatedUnifiedNativeAd(py)store)


  ` The app store name. For example, "App Store".

  #### Declaration

  Swift

      var store: String? { get }

  Objective-C

      @property (nonatomic, copy, readonly, nullable) NSString *store;

- `


  ### [price](https://developers.google.com/admob/ios/api/reference/Protocols/GADMediatedUnifiedNativeAd#/c:objc(pl)GADMediatedUnifiedNativeAd(py)price)


  ` String representation of the app's price.

  #### Declaration

  Swift

      var price: String? { get }

  Objective-C

      @property (nonatomic, copy, readonly, nullable) NSString *price;

- `


  ### [advertiser](https://developers.google.com/admob/ios/api/reference/Protocols/GADMediatedUnifiedNativeAd#/c:objc(pl)GADMediatedUnifiedNativeAd(py)advertiser)


  ` Identifies the advertiser. For example, the advertiser's name or visible URL.

  #### Declaration

  Swift

      var advertiser: String? { get }

  Objective-C

      @property (nonatomic, copy, readonly, nullable) NSString *advertiser;

- `


  ### [extraAssets](https://developers.google.com/admob/ios/api/reference/Protocols/GADMediatedUnifiedNativeAd#/c:objc(pl)GADMediatedUnifiedNativeAd(py)extraAssets)


  ` Returns a dictionary of asset names and object pairs for assets that are not handled by
  properties of the GADMediatedUnifiedNativeAd.

  #### Declaration

  Swift

      var extraAssets: [String : Any]? { get }

  Objective-C

      @property (nonatomic, copy, readonly, nullable) NSDictionary<NSString *, id> *extraAssets;

- `


  ### [adChoicesView](https://developers.google.com/admob/ios/api/reference/Protocols/GADMediatedUnifiedNativeAd#/c:objc(pl)GADMediatedUnifiedNativeAd(py)adChoicesView)


  ` AdChoices view.

  #### Declaration

  Swift

      optional var adChoicesView: UIView? { get }

  Objective-C

      @optional
      @property (nonatomic, readonly, nullable) UIView *adChoicesView;

- `


  ### [mediaView](https://developers.google.com/admob/ios/api/reference/Protocols/GADMediatedUnifiedNativeAd#/c:objc(pl)GADMediatedUnifiedNativeAd(py)mediaView)


  ` Media view.

  #### Declaration

  Swift

      optional var mediaView: UIView? { get }

  Objective-C

      @optional
      @property (nonatomic, readonly, nullable) UIView *mediaView;

- `


  ### [hasVideoContent](https://developers.google.com/admob/ios/api/reference/Protocols/GADMediatedUnifiedNativeAd#/c:objc(pl)GADMediatedUnifiedNativeAd(py)hasVideoContent)


  ` Indicates whether the ad has video content.

  #### Declaration

  Swift

      optional var hasVideoContent: Bool { get }

  Objective-C

      @optional
      @property (nonatomic, readonly) BOOL hasVideoContent;

- `


  ### [mediaContentAspectRatio](https://developers.google.com/admob/ios/api/reference/Protocols/GADMediatedUnifiedNativeAd#/c:objc(pl)GADMediatedUnifiedNativeAd(py)mediaContentAspectRatio)


  ` Media content aspect ratio (width/height) or 0 if there's no media content.

  #### Declaration

  Swift

      optional var mediaContentAspectRatio: CGFloat { get }

  Objective-C

      @optional
      @property (nonatomic, readonly) CGFloat mediaContentAspectRatio;

- `


  ### [duration](https://developers.google.com/admob/ios/api/reference/Protocols/GADMediatedUnifiedNativeAd#/c:objc(pl)GADMediatedUnifiedNativeAd(py)duration)


  ` The video's duration in seconds or 0 if there's no video or the duration is unknown.

  #### Declaration

  Swift

      optional var duration: TimeInterval { get }

  Objective-C

      @optional
      @property (nonatomic, readonly) NSTimeInterval duration;

- `


  ### [currentTime](https://developers.google.com/admob/ios/api/reference/Protocols/GADMediatedUnifiedNativeAd#/c:objc(pl)GADMediatedUnifiedNativeAd(py)currentTime)


  ` The video's current playback time in seconds or 0 if there's no video or the current playback
  time is unknown.

  #### Declaration

  Swift

      optional var currentTime: TimeInterval { get }

  Objective-C

      @optional
      @property (nonatomic, readonly) NSTimeInterval currentTime;

- `


  ### [-didRenderInView:clickableAssetViews:nonclickableAssetViews:viewController:](https://developers.google.com/admob/ios/api/reference/Protocols/GADMediatedUnifiedNativeAd#/c:objc(pl)GADMediatedUnifiedNativeAd(im)didRenderInView:clickableAssetViews:nonclickableAssetViews:viewController:)


  ` Tells the receiver that it has been rendered in \|view\| with clickable asset views and
  nonclickable asset views. viewController should be used to present modal views for the ad.

  #### Declaration

  Swift

      optional func didRender(in view: UIView, clickableAssetViews: [https://developers.google.com/admob/ios/api/reference/Type-Definitions.html#/c:GADNativeAdAssetIdentifiers.h@T@GADNativeAssetIdentifier : UIView], nonclickableAssetViews: [https://developers.google.com/admob/ios/api/reference/Type-Definitions.html#/c:GADNativeAdAssetIdentifiers.h@T@GADNativeAssetIdentifier : UIView], viewController: UIViewController)

  Objective-C

      - (void)didRenderInView:(nonnull UIView *)view
             clickableAssetViews:
                 (nonnull NSDictionary<https://developers.google.com/admob/ios/api/reference/Type-Definitions.html#/c:GADNativeAdAssetIdentifiers.h@T@GADNativeAssetIdentifier, UIView *> *)
                     clickableAssetViews
          nonclickableAssetViews:
              (nonnull NSDictionary<https://developers.google.com/admob/ios/api/reference/Type-Definitions.html#/c:GADNativeAdAssetIdentifiers.h@T@GADNativeAssetIdentifier, UIView *> *)
                  nonclickableAssetViews
                  viewController:(nonnull UIViewController *)viewController;

- `


  ### [-didRecordImpression](https://developers.google.com/admob/ios/api/reference/Protocols/GADMediatedUnifiedNativeAd#/c:objc(pl)GADMediatedUnifiedNativeAd(im)didRecordImpression)


  ` Tells the receiver that an impression is recorded. This method is called only once per mediated
  native ad.

  #### Declaration

  Swift

      optional func didRecordImpression()

  Objective-C

      - (void)didRecordImpression;

- `


  ### [-didRecordClickOnAssetWithName:view:viewController:](https://developers.google.com/admob/ios/api/reference/Protocols/GADMediatedUnifiedNativeAd#/c:objc(pl)GADMediatedUnifiedNativeAd(im)didRecordClickOnAssetWithName:view:viewController:)


  ` Tells the receiver that a user click is recorded on the asset named \|assetName\|. Full screen
  actions should be presented from viewController. This method is called only if
  -\[GADMAdNetworkAdapter handlesUserClicks\] returns NO.

  #### Declaration

  Swift

      optional func didRecordClickOnAsset(with assetName: https://developers.google.com/admob/ios/api/reference/Type-Definitions.html#/c:GADNativeAdAssetIdentifiers.h@T@GADNativeAssetIdentifier, view: UIView, viewController: UIViewController)

  Objective-C

      - (void)
          didRecordClickOnAssetWithName:(nonnull https://developers.google.com/admob/ios/api/reference/Type-Definitions.html#/c:GADNativeAdAssetIdentifiers.h@T@GADNativeAssetIdentifier)assetName
                                   view:(nonnull UIView *)view
                         viewController:(nonnull UIViewController *)viewController;

- `


  ### [-didUntrackView:](https://developers.google.com/admob/ios/api/reference/Protocols/GADMediatedUnifiedNativeAd#/c:objc(pl)GADMediatedUnifiedNativeAd(im)didUntrackView:)


  ` Tells the receiver that it has untracked \|view\|. This method is called when the mediated native
  ad is no longer rendered in the provided view and the delegate should stop tracking the view's
  impressions and clicks. The method may also be called with a nil view when the view in which the
  mediated native ad has rendered is deallocated.

  #### Declaration

  Swift

      optional func didUntrackView(_ view: UIView?)

  Objective-C

      - (void)didUntrackView:(nullable UIView *)view;