GADUnifiedNativeAdDelegate

@protocol GADUnifiedNativeAdDelegate <NSObject>

Identifies native ad assets.

  • Called when an impression is recorded for an ad. Only called for Google ads and is not supported for mediated ads.

    Declaration

    Swift

    optional func nativeAdDidRecordImpression(_ nativeAd: GADUnifiedNativeAd)

    Objective-C

    - (void)nativeAdDidRecordImpression:(nonnull GADUnifiedNativeAd *)nativeAd;
  • Called when a click is recorded for an ad. Only called for Google ads and is not supported for mediated ads.

    Declaration

    Swift

    optional func nativeAdDidRecordClick(_ nativeAd: GADUnifiedNativeAd)

    Objective-C

    - (void)nativeAdDidRecordClick:(nonnull GADUnifiedNativeAd *)nativeAd;
  • Called before presenting the user a full screen view in response to an ad action. Use this opportunity to stop animations, time sensitive interactions, etc.

    Normally the user looks at the ad, dismisses it, and control returns to your application with the nativeAdDidDismissScreen: message. However, if the user hits the Home button or clicks on an App Store link, your application will be backgrounded. The next method called will be the applicationWillResignActive: of your UIApplicationDelegate object. Immediately after that, nativeAdWillLeaveApplication: is called.

    Declaration

    Swift

    optional func nativeAdWillPresentScreen(_ nativeAd: GADUnifiedNativeAd)

    Objective-C

    - (void)nativeAdWillPresentScreen:(nonnull GADUnifiedNativeAd *)nativeAd;
  • Called before dismissing a full screen view.

    Declaration

    Swift

    optional func nativeAdWillDismissScreen(_ nativeAd: GADUnifiedNativeAd)

    Objective-C

    - (void)nativeAdWillDismissScreen:(nonnull GADUnifiedNativeAd *)nativeAd;
  • Called after dismissing a full screen view. Use this opportunity to restart anything you may have stopped as part of nativeAdWillPresentScreen:.

    Declaration

    Swift

    optional func nativeAdDidDismissScreen(_ nativeAd: GADUnifiedNativeAd)

    Objective-C

    - (void)nativeAdDidDismissScreen:(nonnull GADUnifiedNativeAd *)nativeAd;
  • Called before the application will go to the background or terminate due to an ad action that will launch another application (such as the App Store). The normal UIApplicationDelegate methods, like applicationDidEnterBackground:, will be called immediately before this.

    Declaration

    Swift

    optional func nativeAdWillLeaveApplication(_ nativeAd: GADUnifiedNativeAd)

    Objective-C

    - (void)nativeAdWillLeaveApplication:(nonnull GADUnifiedNativeAd *)nativeAd;