GADMediatedNativeAdDelegate

@protocol GADMediatedNativeAdDelegate <NSObject>

GADMediatedNativeAdDelegate objects handle mediated native ad events.

  • Tells the delegate that the mediated native ad has rendered in |view|, a subview of |viewController|.

    Declaration

    Objective-C

    - (void)mediatedNativeAd:(nonnull id<GADMediatedNativeAd>)mediatedNativeAd
             didRenderInView:(id)view
              viewController:(id)viewController;
  • Tells the delegate that the mediated native ad has recorded an impression. This method is called only once per mediated native ad.

    Declaration

    Objective-C

    - (void)mediatedNativeAdDidRecordImpression:
        (nonnull id<GADMediatedNativeAd>)mediatedNativeAd;
  • Tells the delegate that the mediated native ad has recorded a user click on the asset named |assetName|. Full screen actions should be presented from |viewController|. This method is called only if -[GADMAdNetworkAdapter handlesUserClicks] returns NO.

    Declaration

    Objective-C

    - (void)mediatedNativeAd:(nonnull id<GADMediatedNativeAd>)mediatedNativeAd
        didRecordClickOnAssetWithName:(nonnull NSString *)assetName
                                 view:(id)view
                       viewController:(id)viewController;
  • Tells the delegate that the mediated native ad has untracked |view|. This method is called when the mediatedNativeAd is no longer rendered in the provided view and the delegate should stop tracking the view’s impressions and clicks.

    Declaration

    Objective-C

    - (void)mediatedNativeAd:(nonnull id<GADMediatedNativeAd>)mediatedNativeAd
              didUntrackView:(id)view;