GoogleMobileAds Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GADCustomEventNativeAdDelegate
Deprecated
Use GADMediationNativeAdEventDelegate instead.
@protocol GADCustomEventNativeAdDelegate <NSObject>
The delegate of the GADCustomEventNativeAd object must adopt the GADCustomEventNativeAdDelegate
protocol. Methods in this protocol are used for native ad’s custom event communication with the
Google Mobile Ads SDK.
-
Deprecated
Use GADMediationNativeAdEventDelegate instead.
Tells the delegate that the custom event ad request failed.
Declaration
Swift
func customEventNativeAd(_ customEventNativeAd: any GADCustomEventNativeAd, didFailToLoadWithError error: any Error)
Objective-C
- (void)customEventNativeAd:
(nonnull id<GADCustomEventNativeAd>)customEventNativeAd
didFailToLoadWithError:(nonnull NSError *)error;
-
Deprecated
Use GADMediationNativeAdEventDelegate instead.
Tells the delegate that the custom event ad request succeeded and loaded a unified native ad.
Declaration
Swift
func customEventNativeAd(_ customEventNativeAd: any GADCustomEventNativeAd, didReceive mediatedUnifiedNativeAd: 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.
[null,null,["Last updated 2025-08-20 UTC."],[[["\u003cp\u003e\u003ccode\u003eGADCustomEventNativeAdDelegate\u003c/code\u003e is deprecated and developers should use \u003ccode\u003eGADMediationNativeAdEventDelegate\u003c/code\u003e instead.\u003c/p\u003e\n"],["\u003cp\u003eThis protocol facilitates communication between native ad's custom events and the Google Mobile Ads SDK.\u003c/p\u003e\n"],["\u003cp\u003eIt includes methods to inform the delegate about the success or failure of custom event ad requests.\u003c/p\u003e\n"],["\u003cp\u003eUpon success, the delegate receives a \u003ccode\u003eGADMediatedUnifiedNativeAd\u003c/code\u003e object.\u003c/p\u003e\n"],["\u003cp\u003eUpon failure, the delegate is notified with an error object.\u003c/p\u003e\n"]]],[],null,["# GoogleMobileAds Framework Reference\n\nGADCustomEventNativeAdDelegate\n==============================\n\nDeprecated\n\nUse GADMediationNativeAdEventDelegate instead. \n\n @protocol GADCustomEventNativeAdDelegate \u003cNSObject\u003e\n\nThe delegate of the GADCustomEventNativeAd object must adopt the GADCustomEventNativeAdDelegate\nprotocol. Methods in this protocol are used for native ad's custom event communication with the\nGoogle Mobile Ads SDK.\n- `\n ``\n ``\n `\n\n ### [-customEventNativeAd:didFailToLoadWithError:](#/c:objc(pl)GADCustomEventNativeAdDelegate(im)customEventNativeAd:didFailToLoadWithError:)\n\n `\n ` \n Deprecated\n\n Use GADMediationNativeAdEventDelegate instead. \n Tells the delegate that the custom event ad request failed. \n\n #### Declaration\n\n Swift \n\n func customEventNativeAd(_ customEventNativeAd: any ../Protocols/GADCustomEventNativeAd.html, didFailToLoadWithError error: any Error)\n\n Objective-C \n\n - (void)customEventNativeAd:\n (nonnull id\u003c../Protocols/GADCustomEventNativeAd.html\u003e)customEventNativeAd\n didFailToLoadWithError:(nonnull NSError *)error;\n\n- `\n ``\n ``\n `\n\n ### [-customEventNativeAd:didReceiveMediatedUnifiedNativeAd:](#/c:objc(pl)GADCustomEventNativeAdDelegate(im)customEventNativeAd:didReceiveMediatedUnifiedNativeAd:)\n\n `\n ` \n Deprecated\n\n Use GADMediationNativeAdEventDelegate instead. \n Tells the delegate that the custom event ad request succeeded and loaded a unified native ad. \n\n #### Declaration\n\n Swift \n\n func customEventNativeAd(_ customEventNativeAd: any ../Protocols/GADCustomEventNativeAd.html, didReceive mediatedUnifiedNativeAd: any MediatedUnifiedNativeAd)\n\n Objective-C \n\n - (void)customEventNativeAd:\n (nonnull id\u003c../Protocols/GADCustomEventNativeAd.html\u003e)customEventNativeAd\n didReceiveMediatedUnifiedNativeAd:\n (nonnull id\u003c../Protocols/GADMediatedUnifiedNativeAd.html\u003e)mediatedUnifiedNativeAd;"]]