GoogleMobileAds Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GADNativeAdDelegate
@protocol GADNativeAdDelegate <NSObject>
Identifies native ad assets.
-
Called when an impression is recorded for an ad.
Declaration
Swift
optional func nativeAdDidRecordImpression(_ nativeAd: GADNativeAd)
Objective-C
- (void)nativeAdDidRecordImpression:(nonnull GADNativeAd *)nativeAd;
-
Called when a click is recorded for an ad.
Declaration
Swift
optional func nativeAdDidRecordClick(_ nativeAd: GADNativeAd)
Objective-C
- (void)nativeAdDidRecordClick:(nonnull GADNativeAd *)nativeAd;
-
Called when a swipe gesture click is recorded for an ad.
Declaration
Swift
optional func nativeAdDidRecordSwipeGestureClick(_ nativeAd: GADNativeAd)
Objective-C
- (void)nativeAdDidRecordSwipeGestureClick:(nonnull GADNativeAd *)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.
Declaration
Swift
@MainActor optional func nativeAdWillPresentScreen(_ nativeAd: GADNativeAd)
Objective-C
- (void)nativeAdWillPresentScreen:(nonnull GADNativeAd *)nativeAd;
-
Called before dismissing a full screen view.
Declaration
Swift
@MainActor optional func nativeAdWillDismissScreen(_ nativeAd: GADNativeAd)
Objective-C
- (void)nativeAdWillDismissScreen:(nonnull GADNativeAd *)nativeAd;
-
Called after dismissing a full screen view. Use this opportunity to restart anything you may
have stopped as part of nativeAdWillPresentScreen:.
Declaration
Swift
@MainActor optional func nativeAdDidDismissScreen(_ nativeAd: GADNativeAd)
Objective-C
- (void)nativeAdDidDismissScreen:(nonnull GADNativeAd *)nativeAd;
-
Used for Mute This Ad feature. Called after the native ad is muted. Only called for Google ads
and is not supported for mediated ads.
Declaration
Swift
optional func nativeAdIsMuted(_ nativeAd: GADNativeAd)
Objective-C
- (void)nativeAdIsMuted:(nonnull GADNativeAd *)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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-20 UTC."],[[["\u003cp\u003e\u003ccode\u003eGADNativeAdDelegate\u003c/code\u003e identifies native ad assets and provides lifecycle event notifications.\u003c/p\u003e\n"],["\u003cp\u003eIt includes methods to track impressions, clicks, and swipe gestures on native ads.\u003c/p\u003e\n"],["\u003cp\u003eThe delegate handles click-time lifecycle events like presenting and dismissing full-screen views.\u003c/p\u003e\n"],["\u003cp\u003eIt provides a notification for when a Google native ad is muted.\u003c/p\u003e\n"]]],["The `GADNativeAdDelegate` protocol manages native ad interactions. It defines methods for tracking ad engagement, including impression (`nativeAdDidRecordImpression:`), click (`nativeAdDidRecordClick:`, `nativeAdDidRecordSwipeGestureClick:`), and full-screen view presentation (`nativeAdWillPresentScreen:`, `nativeAdWillDismissScreen:`, `nativeAdDidDismissScreen:`). It also allows for a muted state tracking (`nativeAdIsMuted:`). The methods are triggered when specific events occur, such as an ad impression being recorded, a click, or when the user interacts with a full-screen ad view.\n"],null,["GADNativeAdDelegate \n\n @protocol GADNativeAdDelegate \u003cNSObject\u003e\n\nIdentifies native ad assets.\n[Ad Lifecycle Events](#/Ad-Lifecycle-Events)\n\n- `\n ``\n ``\n `\n\n [-nativeAdDidRecordImpression:](#/c:objc(pl)GADNativeAdDelegate(im)nativeAdDidRecordImpression:)`\n ` \n Called when an impression is recorded for an ad. \n\n Declaration \n Swift \n\n optional func nativeAdDidRecordImpression(_ nativeAd: ../Classes/GADNativeAd.html)\n\n Objective-C \n\n - (void)nativeAdDidRecordImpression:(nonnull ../Classes/GADNativeAd.html *)nativeAd;\n\n- `\n ``\n ``\n `\n\n [-nativeAdDidRecordClick:](#/c:objc(pl)GADNativeAdDelegate(im)nativeAdDidRecordClick:)`\n ` \n Called when a click is recorded for an ad. \n\n Declaration \n Swift \n\n optional func nativeAdDidRecordClick(_ nativeAd: ../Classes/GADNativeAd.html)\n\n Objective-C \n\n - (void)nativeAdDidRecordClick:(nonnull ../Classes/GADNativeAd.html *)nativeAd;\n\n- `\n ``\n ``\n `\n\n [-nativeAdDidRecordSwipeGestureClick:](#/c:objc(pl)GADNativeAdDelegate(im)nativeAdDidRecordSwipeGestureClick:)`\n ` \n Called when a swipe gesture click is recorded for an ad. \n\n Declaration \n Swift \n\n optional func nativeAdDidRecordSwipeGestureClick(_ nativeAd: ../Classes/GADNativeAd.html)\n\n Objective-C \n\n - (void)nativeAdDidRecordSwipeGestureClick:(nonnull ../Classes/GADNativeAd.html *)nativeAd;\n\n[Click-Time Lifecycle Notifications](#/Click-Time-Lifecycle-Notifications)\n\n- `\n ``\n ``\n `\n\n [-nativeAdWillPresentScreen:](#/c:objc(pl)GADNativeAdDelegate(im)nativeAdWillPresentScreen:)`\n ` \n Called before presenting the user a full screen view in response to an ad action. Use this\n 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 nativeAdDidDismissScreen: message. However, if the user hits the Home button or clicks on an\n App Store link, your application will be backgrounded. The next method called will be the\n applicationWillResignActive: of your UIApplicationDelegate object. \n\n Declaration \n Swift \n\n @MainActor optional func nativeAdWillPresentScreen(_ nativeAd: ../Classes/GADNativeAd.html)\n\n Objective-C \n\n - (void)nativeAdWillPresentScreen:(nonnull ../Classes/GADNativeAd.html *)nativeAd;\n\n- `\n ``\n ``\n `\n\n [-nativeAdWillDismissScreen:](#/c:objc(pl)GADNativeAdDelegate(im)nativeAdWillDismissScreen:)`\n ` \n Called before dismissing a full screen view. \n\n Declaration \n Swift \n\n @MainActor optional func nativeAdWillDismissScreen(_ nativeAd: ../Classes/GADNativeAd.html)\n\n Objective-C \n\n - (void)nativeAdWillDismissScreen:(nonnull ../Classes/GADNativeAd.html *)nativeAd;\n\n- `\n ``\n ``\n `\n\n [-nativeAdDidDismissScreen:](#/c:objc(pl)GADNativeAdDelegate(im)nativeAdDidDismissScreen:)`\n ` \n Called after dismissing a full screen view. Use this opportunity to restart anything you may\n have stopped as part of nativeAdWillPresentScreen:. \n\n Declaration \n Swift \n\n @MainActor optional func nativeAdDidDismissScreen(_ nativeAd: ../Classes/GADNativeAd.html)\n\n Objective-C \n\n - (void)nativeAdDidDismissScreen:(nonnull ../Classes/GADNativeAd.html *)nativeAd;\n\n[Mute This Ad](#/Mute-This-Ad)\n\n- `\n ``\n ``\n `\n\n [-nativeAdIsMuted:](#/c:objc(pl)GADNativeAdDelegate(im)nativeAdIsMuted:)`\n ` \n Used for Mute This Ad feature. Called after the native ad is muted. Only called for Google ads\n and is not supported for mediated ads. \n\n Declaration \n Swift \n\n optional func nativeAdIsMuted(_ nativeAd: ../Classes/GADNativeAd.html)\n\n Objective-C \n\n - (void)nativeAdIsMuted:(nonnull ../Classes/GADNativeAd.html *)nativeAd;"]]