GoogleMobileAds Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GADCustomNativeAdDelegate
@protocol GADCustomNativeAdDelegate <NSObject>
Identifies native ad assets.
-
Called when an impression is recorded for a custom native ad.
Declaration
Objective-C
- (void)customNativeAdDidRecordImpression:(nonnull GADCustomNativeAd *)nativeAd;
-
Called when a click is recorded for a custom native ad.
Declaration
Objective-C
- (void)customNativeAdDidRecordClick:(nonnull GADCustomNativeAd *)nativeAd;
-
Called just before presenting the user a full screen view, such as a browser, in response to
clicking on an ad. 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 customNativeAdDidDismissScreen: message. However, if the user hits the Home button or clicks
on an App Store link, your application will end. The next method called will be the
applicationWillResignActive: of your UIApplicationDelegate object.
Declaration
Swift
@MainActor optional func customNativeAdWillPresentScreen(_ nativeAd: GADCustomNativeAd)
Objective-C
- (void)customNativeAdWillPresentScreen:(nonnull GADCustomNativeAd *)nativeAd;
-
Called just before dismissing a full screen view.
Declaration
Swift
@MainActor optional func customNativeAdWillDismissScreen(_ nativeAd: GADCustomNativeAd)
Objective-C
- (void)customNativeAdWillDismissScreen:(nonnull GADCustomNativeAd *)nativeAd;
-
Called just after dismissing a full screen view. Use this opportunity to restart anything you
may have stopped as part of customNativeAdWillPresentScreen:.
Declaration
Swift
@MainActor optional func customNativeAdDidDismissScreen(_ nativeAd: GADCustomNativeAd)
Objective-C
- (void)customNativeAdDidDismissScreen:(nonnull GADCustomNativeAd *)nativeAd;
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
[null,null,["Last updated 2025-08-20 UTC."],[[["\u003cp\u003e\u003ccode\u003eGADCustomNativeAdDelegate\u003c/code\u003e helps identify native ad assets and provides lifecycle event callbacks.\u003c/p\u003e\n"],["\u003cp\u003eIt includes methods to track impressions and clicks on custom native ads.\u003c/p\u003e\n"],["\u003cp\u003eThis delegate also provides notifications for click-time lifecycle events such as presenting and dismissing full-screen views.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use these callbacks to manage application behavior in response to ad interactions, like pausing animations or restarting them.\u003c/p\u003e\n"],["\u003cp\u003eThese methods help to integrate custom native ads seamlessly into an application and manage the user experience around ad interactions.\u003c/p\u003e\n"]]],["The `GADCustomNativeAdDelegate` protocol identifies native ad assets and manages ad lifecycle events. It includes methods like `customNativeAdDidRecordImpression:` and `customNativeAdDidRecordClick:` to track ad views and clicks. Additionally, it handles full-screen view presentations with `customNativeAdWillPresentScreen:`, `customNativeAdWillDismissScreen:`, and `customNativeAdDidDismissScreen:`, allowing for the management of animations and interactions before, during, and after the full-screen view is presented. These methods are available in both Swift and Objective-C.\n"],null,["# GoogleMobileAds Framework Reference\n\nGADCustomNativeAdDelegate\n=========================\n\n @protocol GADCustomNativeAdDelegate \u003cNSObject\u003e\n\nIdentifies native ad assets.\n[Ad Lifecycle Events\n-------------------](#/Ad-Lifecycle-Events)\n\n- `\n ``\n ``\n `\n\n ### [-customNativeAdDidRecordImpression:](#/c:objc(pl)GADCustomNativeAdDelegate(im)customNativeAdDidRecordImpression:)\n\n `\n ` \n Called when an impression is recorded for a custom native ad. \n\n #### Declaration\n\n Swift \n\n optional func customNativeAdDidRecordImpression(_ nativeAd: ../Classes/GADCustomNativeAd.html)\n\n Objective-C \n\n - (void)customNativeAdDidRecordImpression:(nonnull ../Classes/GADCustomNativeAd.html *)nativeAd;\n\n- `\n ``\n ``\n `\n\n ### [-customNativeAdDidRecordClick:](#/c:objc(pl)GADCustomNativeAdDelegate(im)customNativeAdDidRecordClick:)\n\n `\n ` \n Called when a click is recorded for a custom native ad. \n\n #### Declaration\n\n Swift \n\n optional func customNativeAdDidRecordClick(_ nativeAd: ../Classes/GADCustomNativeAd.html)\n\n Objective-C \n\n - (void)customNativeAdDidRecordClick:(nonnull ../Classes/GADCustomNativeAd.html *)nativeAd;\n\n[Click-Time Lifecycle Notifications\n----------------------------------](#/Click-Time-Lifecycle-Notifications)\n\n- `\n ``\n ``\n `\n\n ### [-customNativeAdWillPresentScreen:](#/c:objc(pl)GADCustomNativeAdDelegate(im)customNativeAdWillPresentScreen:)\n\n `\n ` \n Called just before presenting the user a full screen view, such as a browser, in response to\n clicking on an ad. Use this opportunity to stop animations, time sensitive interactions, etc.\n\n Normally the user looks at the ad, dismisses it, and control returns to your application with\n the customNativeAdDidDismissScreen: message. However, if the user hits the Home button or clicks\n on an App Store link, your application will end. The next method called will be the\n applicationWillResignActive: of your UIApplicationDelegate object. \n\n #### Declaration\n\n Swift \n\n @MainActor optional func customNativeAdWillPresentScreen(_ nativeAd: ../Classes/GADCustomNativeAd.html)\n\n Objective-C \n\n - (void)customNativeAdWillPresentScreen:(nonnull ../Classes/GADCustomNativeAd.html *)nativeAd;\n\n- `\n ``\n ``\n `\n\n ### [-customNativeAdWillDismissScreen:](#/c:objc(pl)GADCustomNativeAdDelegate(im)customNativeAdWillDismissScreen:)\n\n `\n ` \n Called just before dismissing a full screen view. \n\n #### Declaration\n\n Swift \n\n @MainActor optional func customNativeAdWillDismissScreen(_ nativeAd: ../Classes/GADCustomNativeAd.html)\n\n Objective-C \n\n - (void)customNativeAdWillDismissScreen:(nonnull ../Classes/GADCustomNativeAd.html *)nativeAd;\n\n- `\n ``\n ``\n `\n\n ### [-customNativeAdDidDismissScreen:](#/c:objc(pl)GADCustomNativeAdDelegate(im)customNativeAdDidDismissScreen:)\n\n `\n ` \n Called just after dismissing a full screen view. Use this opportunity to restart anything you\n may have stopped as part of customNativeAdWillPresentScreen:. \n\n #### Declaration\n\n Swift \n\n @MainActor optional func customNativeAdDidDismissScreen(_ nativeAd: ../Classes/GADCustomNativeAd.html)\n\n Objective-C \n\n - (void)customNativeAdDidDismissScreen:(nonnull ../Classes/GADCustomNativeAd.html *)nativeAd;"]]