GoogleMobileAds Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
@interface GADMediatedUnifiedNativeAdNotificationSource : 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 opening the iTunes store) when handling methods
in GADMediatedUnifiedNativeAd. 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 MediatedUnifiedNativeAd)
-
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 MediatedUnifiedNativeAd)
-
Must be called by the adapter just before mediatedNativeAd has opened an in-app modal screen.
Declaration
Swift
class func mediatedNativeAdWillPresentScreen(_ mediatedNativeAd: any MediatedUnifiedNativeAd)
-
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 MediatedUnifiedNativeAd)
-
Must be called by the adapter after the in-app modal screen opened by mediatedNativeAd is
dismissed.
Declaration
Swift
class func mediatedNativeAdDidDismissScreen(_ mediatedNativeAd: any MediatedUnifiedNativeAd)
-
Called by the adapter when native video playback has begun or resumed.
Declaration
Swift
class func mediatedNativeAdDidPlayVideo(_ mediatedNativeAd: any MediatedUnifiedNativeAd)
-
Called by the adapter when native video playback has paused.
Declaration
Swift
class func mediatedNativeAdDidPauseVideo(_ mediatedNativeAd: any MediatedUnifiedNativeAd)
-
Called by the adapter when native video playback has ended.
Declaration
Swift
class func mediatedNativeAdDidEndVideoPlayback(_ mediatedNativeAd: any MediatedUnifiedNativeAd)
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\u003eGADMediatedUnifiedNativeAdNotificationSource\u003c/code\u003e enables adapters to inform the Google Mobile Ads SDK about user interactions and events related to a mediated native ad.\u003c/p\u003e\n"],["\u003cp\u003eAdapters use this class to notify the SDK about impressions, clicks, screen presentations, video playback events, and other relevant actions performed by the user or the ad itself.\u003c/p\u003e\n"],["\u003cp\u003eBy calling specific methods within this class, adapters ensure the Google Mobile Ads SDK remains synchronized with the ad's lifecycle and user engagement.\u003c/p\u003e\n"],["\u003cp\u003eThis communication is crucial for accurate tracking, reporting, and overall ad performance within the Google Mobile Ads ecosystem.\u003c/p\u003e\n"]]],["GADMediatedUnifiedNativeAdNotificationSource allows adapters to inform the Google Mobile Ads SDK about events. Adapters must call `mediatedNativeAdDidRecordImpression:` when an impression is registered and `mediatedNativeAdDidRecordClick:` when a click occurs. For in-app screens, adapters should call `mediatedNativeAdWillPresentScreen:`, `mediatedNativeAdWillDismissScreen:`, and `mediatedNativeAdDidDismissScreen:`. For video, they should call `mediatedNativeAdDidPlayVideo:`, `mediatedNativeAdDidPauseVideo:`, and `mediatedNativeAdDidEndVideoPlayback:`.\n"],null,["# GoogleMobileAds Framework Reference\n\nGADMediatedUnifiedNativeAdNotificationSource\n============================================\n\n\n @interface GADMediatedUnifiedNativeAdNotificationSource : NSObject\n\nNotifies the Google Mobile Ads SDK about the events performed by adapters. Adapters may perform\nsome action (e.g. opening an in app browser or opening the iTunes store) when handling methods\nin GADMediatedUnifiedNativeAd. Adapters in such case should notify the Google Mobile Ads SDK by\ncalling the relevant methods from this class.\n- `\n ``\n ``\n `\n\n ### [+mediatedNativeAdDidRecordImpression:](#/c:objc(cs)GADMediatedUnifiedNativeAdNotificationSource(cm)mediatedNativeAdDidRecordImpression:)\n\n `\n ` \n Called by the adapter when it has registered an impression on the tracked view. Adapter should\n only call this method if -\\[GADMAdNetworkAdapter handlesUserImpressions\\] returns YES. \n\n #### Declaration\n\n Swift \n\n class func mediatedNativeAdDidRecordImpression(_ mediatedNativeAd: any MediatedUnifiedNativeAd)\n\n Objective-C \n\n + (void)mediatedNativeAdDidRecordImpression:\n (nonnull id\u003c../Protocols/GADMediatedUnifiedNativeAd.html\u003e)mediatedNativeAd;\n\n- `\n ``\n ``\n `\n\n ### [+mediatedNativeAdDidRecordClick:](#/c:objc(cs)GADMediatedUnifiedNativeAdNotificationSource(cm)mediatedNativeAdDidRecordClick:)\n\n `\n ` \n Called by the adapter when it has registered a user click on the tracked view. Adapter should\n only call this method if -\\[GADMAdNetworkAdapter handlesUserClicks\\] returns YES. \n\n #### Declaration\n\n Swift \n\n class func mediatedNativeAdDidRecordClick(_ mediatedNativeAd: any MediatedUnifiedNativeAd)\n\n Objective-C \n\n + (void)mediatedNativeAdDidRecordClick:\n (nonnull id\u003c../Protocols/GADMediatedUnifiedNativeAd.html\u003e)mediatedNativeAd;\n\n- `\n ``\n ``\n `\n\n ### [+mediatedNativeAdWillPresentScreen:](#/c:objc(cs)GADMediatedUnifiedNativeAdNotificationSource(cm)mediatedNativeAdWillPresentScreen:)\n\n `\n ` \n Must be called by the adapter just before mediatedNativeAd has opened an in-app modal screen. \n\n #### Declaration\n\n Swift \n\n class func mediatedNativeAdWillPresentScreen(_ mediatedNativeAd: any MediatedUnifiedNativeAd)\n\n Objective-C \n\n + (void)mediatedNativeAdWillPresentScreen:\n (nonnull id\u003c../Protocols/GADMediatedUnifiedNativeAd.html\u003e)mediatedNativeAd;\n\n- `\n ``\n ``\n `\n\n ### [+mediatedNativeAdWillDismissScreen:](#/c:objc(cs)GADMediatedUnifiedNativeAdNotificationSource(cm)mediatedNativeAdWillDismissScreen:)\n\n `\n ` \n Must be called by the adapter just before the in-app modal screen opened by mediatedNativeAd is\n dismissed. \n\n #### Declaration\n\n Swift \n\n class func mediatedNativeAdWillDismissScreen(_ mediatedNativeAd: any MediatedUnifiedNativeAd)\n\n Objective-C \n\n + (void)mediatedNativeAdWillDismissScreen:\n (nonnull id\u003c../Protocols/GADMediatedUnifiedNativeAd.html\u003e)mediatedNativeAd;\n\n- `\n ``\n ``\n `\n\n ### [+mediatedNativeAdDidDismissScreen:](#/c:objc(cs)GADMediatedUnifiedNativeAdNotificationSource(cm)mediatedNativeAdDidDismissScreen:)\n\n `\n ` \n Must be called by the adapter after the in-app modal screen opened by mediatedNativeAd is\n dismissed. \n\n #### Declaration\n\n Swift \n\n class func mediatedNativeAdDidDismissScreen(_ mediatedNativeAd: any MediatedUnifiedNativeAd)\n\n Objective-C \n\n + (void)mediatedNativeAdDidDismissScreen:\n (nonnull id\u003c../Protocols/GADMediatedUnifiedNativeAd.html\u003e)mediatedNativeAd;\n\n[Mediated Native Video Ad Notifications\n--------------------------------------](#/Mediated-Native-Video-Ad-Notifications)\n\n- `\n ``\n ``\n `\n\n ### [+mediatedNativeAdDidPlayVideo:](#/c:objc(cs)GADMediatedUnifiedNativeAdNotificationSource(cm)mediatedNativeAdDidPlayVideo:)\n\n `\n ` \n Called by the adapter when native video playback has begun or resumed. \n\n #### Declaration\n\n Swift \n\n class func mediatedNativeAdDidPlayVideo(_ mediatedNativeAd: any MediatedUnifiedNativeAd)\n\n Objective-C \n\n + (void)mediatedNativeAdDidPlayVideo:\n (nonnull id\u003c../Protocols/GADMediatedUnifiedNativeAd.html\u003e)mediatedNativeAd;\n\n- `\n ``\n ``\n `\n\n ### [+mediatedNativeAdDidPauseVideo:](#/c:objc(cs)GADMediatedUnifiedNativeAdNotificationSource(cm)mediatedNativeAdDidPauseVideo:)\n\n `\n ` \n Called by the adapter when native video playback has paused. \n\n #### Declaration\n\n Swift \n\n class func mediatedNativeAdDidPauseVideo(_ mediatedNativeAd: any MediatedUnifiedNativeAd)\n\n Objective-C \n\n + (void)mediatedNativeAdDidPauseVideo:\n (nonnull id\u003c../Protocols/GADMediatedUnifiedNativeAd.html\u003e)mediatedNativeAd;\n\n- `\n ``\n ``\n `\n\n ### [+mediatedNativeAdDidEndVideoPlayback:](#/c:objc(cs)GADMediatedUnifiedNativeAdNotificationSource(cm)mediatedNativeAdDidEndVideoPlayback:)\n\n `\n ` \n Called by the adapter when native video playback has ended. \n\n #### Declaration\n\n Swift \n\n class func mediatedNativeAdDidEndVideoPlayback(_ mediatedNativeAd: any MediatedUnifiedNativeAd)\n\n Objective-C \n\n + (void)mediatedNativeAdDidEndVideoPlayback:\n (nonnull id\u003c../Protocols/GADMediatedUnifiedNativeAd.html\u003e)mediatedNativeAd;"]]