GADMediatedNativeAdNotificationSource

@interface GADMediatedNativeAdNotificationSource : NSObject

Notifies the Google Mobile Ads SDK about the events performed by adapters. Adapters may perform some action (e.g. opening an in app browser or open the iTunes store) when handling callbacks from GADMediatedNativeAdDelegate. Adapters in such case should notify the Google Mobile Ads SDK by calling the relevant methods from this class.

  • Called by the adapter when it has registered an impression on the tracked view. Adapter should only call this method if -[GADMAdNetworkAdapter handlesUserImpressions] returns YES.

    Declaration

    Swift

    class func mediatedNativeAdDidRecordImpression(_ mediatedNativeAd: Any!)

    Objective-C

    + (void)mediatedNativeAdDidRecordImpression:
        (nonnull id<GADMediatedNativeAd>)mediatedNativeAd;
  • Called by the adapter when it has registered a user click on the tracked view. Adapter should only call this method if -[GADMAdNetworkAdapter handlesUserClicks] returns YES.

    Declaration

    Swift

    class func mediatedNativeAdDidRecordClick(_ mediatedNativeAd: Any!)

    Objective-C

    + (void)mediatedNativeAdDidRecordClick:
        (nonnull id<GADMediatedNativeAd>)mediatedNativeAd;
  • Must be called by the adapter just before mediatedNativeAd has opened an in app modal screen.

    Declaration

    Swift

    class func mediatedNativeAdWillPresentScreen(_ mediatedNativeAd: Any!)

    Objective-C

    + (void)mediatedNativeAdWillPresentScreen:
        (nonnull id<GADMediatedNativeAd>)mediatedNativeAd;
  • Must be called by the adapter just before the in app modal screen opened by mediatedNativeAd is dismissed.

    Declaration

    Swift

    class func mediatedNativeAdWillDismissScreen(_ mediatedNativeAd: Any!)

    Objective-C

    + (void)mediatedNativeAdWillDismissScreen:
        (nonnull id<GADMediatedNativeAd>)mediatedNativeAd;
  • Must be called by the adapter after the in app modal screen opened by mediatedNativeAd is dismissed.

    Declaration

    Swift

    class func mediatedNativeAdDidDismissScreen(_ mediatedNativeAd: Any!)

    Objective-C

    + (void)mediatedNativeAdDidDismissScreen:
        (nonnull id<GADMediatedNativeAd>)mediatedNativeAd;
  • Must be called by the adapter just before mediatedNativeAd has left the application.

    Declaration

    Swift

    class func mediatedNativeAdWillLeaveApplication(_ mediatedNativeAd: Any!)

    Objective-C

    + (void)mediatedNativeAdWillLeaveApplication:
        (nonnull id<GADMediatedNativeAd>)mediatedNativeAd;