Returns a version string for the adapter. It can be any string that uniquely identifies the
adapter’s version. For example, “1.0”, or a date such as “20110915”.
Returns the extras class that is used by publishers to provide additional parameters to this
adapter. Returns Nil if the adapter doesn’t have extra publisher provided settings.
Designated initializer. Adapters can and should store a weak reference to the connector.
However, adapters must not keep a strong reference to the connector, as doing so creates a
reference cycle and abandoned memory.
Asks the adapter to initiate an asynchronous banner ad request. The adapter may act as a
delegate to your SDK to listen to callbacks. If your SDK doesn’t support the given ad size, or
doesn’t support banner ads, call adapter:didFailAd: on the connector.
Asks the adapter to initiate an asynchronous interstitial ad request. The adapter may act as a
delegate to your SDK to listen to callbacks. If your SDK doesn’t support interstitials, call
adapter:didFailInterstitial: on the connector.
When called, the adapter must remove strong references to itself (e.g., delegate properties and
notification observers). You should also call this method in your adapter dealloc to prevent
your SDK from interacting with the deallocated adapter. This function may be called multiple
times.
Presents an interstitial using the supplied UIViewController, by calling
presentViewController:animated:completion:.
Your interstitial should not immediately present itself when it is received. Instead, you should
wait until this method is called on your adapter to present the interstitial.
The adapter must call adapterWillPresentInterstitial: on the connector when the interstitial is
about to be presented, and adapterWillDismissInterstitial: and adapterDidDismissInterstitial:
when the interstitial is being dismissed.
Asks the adapter to initiate an asynchronous native ad request. |adTypes| contains the list of
native ad types requested. See GADAdLoaderAdTypes.h for available ad types. |options| contains
additional options configured by the publisher. See GADNativeAdImageAdLoaderOptions.h for
available image options.
On ad load success or failure, call adapter:didReceiveNativeAdDataSource:mediationDelegate or
adapter:didFailAd: on the connector.
Indicates if the adapter handles user clicks. If the adapter returns YES, it must handle user
clicks and notify the Google Mobile Ads SDK of clicks using
+[GADMediatedNativeAdNotificationSource mediatedNativeAdDidRecordClick:]. If the adapter returns
NO, the Google Mobile Ads SDK handles user clicks and notifies the adapter of clicks using
-[GADMediatedUnifiedNativeAd didRecordClickOnAssetWithName:view:viewController:].
Indicates if the adapter handles user impressions tracking. If the adapter returns YES, the
Google Mobile Ads SDK will not track user impressions and the adapter must notify the
Google Mobile Ads SDK of impressions using +[GADMediatedNativeAdNotificationSource
mediatedNativeAdDidRecordImpression:]. If the adapter returns NO, the Google Mobile Ads SDK
tracks user impressions and notifies the adapter of impressions using
-[GADMediatedUnifiedNativeAd didRecordImpression].
If your ad network handles multiple ad sizes for the same banner ad, implement this method to be
informed of banner size updates. Ad sizes typically change between kGADAdSizeSmartBannerPortrait
and kGADAdSizeSmartBannerLandscape. If this method is not implemented, the ad is removed from
the user interface when the size changes.
[[["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\u003eThe \u003ccode\u003eGADMAdNetworkAdapter\u003c/code\u003e protocol defines methods for ad network adapters to communicate with the Google Mobile Ads SDK.\u003c/p\u003e\n"],["\u003cp\u003eAdapters are responsible for initiating ad requests, handling callbacks, and presenting ads.\u003c/p\u003e\n"],["\u003cp\u003eMethods are provided for banner, interstitial, and native ad formats, along with options for handling user clicks and impressions.\u003c/p\u003e\n"],["\u003cp\u003eAdapters must avoid strong reference cycles and should remove strong references to themselves when instructed.\u003c/p\u003e\n"],["\u003cp\u003eSome methods, like \u003ccode\u003echangeAdSizeTo\u003c/code\u003e, are optional and allow for handling specific ad network behaviors.\u003c/p\u003e\n"]]],[],null,["# GoogleMobileAds Framework Reference\n\nGADMAdNetworkAdapter\n====================\n\n @protocol GADMAdNetworkAdapter \u003cNSObject\u003e\n\nAd network adapter protocol.\n- `\n ``\n ``\n `\n\n ### [+adapterVersion](#/c:objc(pl)GADMAdNetworkAdapter(cm)adapterVersion)\n\n `\n ` \n Returns a version string for the adapter. It can be any string that uniquely identifies the\n adapter's version. For example, \"1.0\", or a date such as \"20110915\". \n\n #### Declaration\n\n Swift \n\n static func adapterVersion() -\u003e String!\n\n Objective-C \n\n + (NSString *)adapterVersion;\n\n- `\n ``\n ``\n `\n\n ### [+networkExtrasClass](#/c:objc(pl)GADMAdNetworkAdapter(cm)networkExtrasClass)\n\n `\n ` \n Returns the extras class that is used by publishers to provide additional parameters to this\n adapter. Returns Nil if the adapter doesn't have extra publisher provided settings. \n\n #### Declaration\n\n Swift \n\n static func networkExtrasClass() -\u003e (any AdNetworkExtras.Type)!\n\n Objective-C \n\n + (Class\u003c../Protocols.html#/c:objc(pl)GADAdNetworkExtras\u003e)networkExtrasClass;\n\n- `\n ``\n ``\n `\n\n ### [-initWithGADMAdNetworkConnector:](#/c:objc(pl)GADMAdNetworkAdapter(im)initWithGADMAdNetworkConnector:)\n\n `\n ` \n Designated initializer. Adapters can and should store a weak reference to the connector.\n However, adapters must not keep a strong reference to the connector, as doing so creates a\n reference cycle and abandoned memory. \n\n #### Declaration\n\n Swift \n\n init!(gadmAdNetworkConnector connector: (any MediationAdNetworkConnector)!)\n\n Objective-C \n\n - (instancetype)initWithGADMAdNetworkConnector:\n (id\u003c../Protocols/GADMAdNetworkConnector.html\u003e)connector;\n\n- `\n ``\n ``\n `\n\n ### [-getBannerWithSize:](#/c:objc(pl)GADMAdNetworkAdapter(im)getBannerWithSize:)\n\n `\n ` \n Asks the adapter to initiate an asynchronous banner ad request. The adapter may act as a\n delegate to your SDK to listen to callbacks. If your SDK doesn't support the given ad size, or\n doesn't support banner ads, call adapter:didFailAd: on the connector. \n\n #### Declaration\n\n Swift \n\n func getBanner(with adSize: AdSize)\n\n Objective-C \n\n - (void)getBannerWithSize:(../Structs/GADAdSize.html)adSize;\n\n- `\n ``\n ``\n `\n\n ### [-getInterstitial](#/c:objc(pl)GADMAdNetworkAdapter(im)getInterstitial)\n\n `\n ` \n Asks the adapter to initiate an asynchronous interstitial ad request. The adapter may act as a\n delegate to your SDK to listen to callbacks. If your SDK doesn't support interstitials, call\n adapter:didFailInterstitial: on the connector. \n\n #### Declaration\n\n Swift \n\n func getInterstitial()\n\n Objective-C \n\n - (void)getInterstitial;\n\n- `\n ``\n ``\n `\n\n ### [-stopBeingDelegate](#/c:objc(pl)GADMAdNetworkAdapter(im)stopBeingDelegate)\n\n `\n ` \n When called, the adapter must remove strong references to itself (e.g., delegate properties and\n notification observers). You should also call this method in your adapter dealloc to prevent\n your SDK from interacting with the deallocated adapter. This function may be called multiple\n times. \n\n #### Declaration\n\n Swift \n\n func stopBeingDelegate()\n\n Objective-C \n\n - (void)stopBeingDelegate;\n\n- `\n ``\n ``\n `\n\n ### [-presentInterstitialFromRootViewController:](#/c:objc(pl)GADMAdNetworkAdapter(im)presentInterstitialFromRootViewController:)\n\n `\n ` \n Presents an interstitial using the supplied UIViewController, by calling\n presentViewController:animated:completion:.\n\n Your interstitial should not immediately present itself when it is received. Instead, you should\n wait until this method is called on your adapter to present the interstitial.\n\n The adapter must call adapterWillPresentInterstitial: on the connector when the interstitial is\n about to be presented, and adapterWillDismissInterstitial: and adapterDidDismissInterstitial:\n when the interstitial is being dismissed. \n\n #### Declaration\n\n Swift \n\n func presentInterstitial(from rootViewController: UIViewController!)\n\n Objective-C \n\n - (void)presentInterstitialFromRootViewController:\n (UIViewController *)rootViewController;\n\n- `\n ``\n ``\n `\n\n ### [-getNativeAdWithAdTypes:options:](#/c:objc(pl)GADMAdNetworkAdapter(im)getNativeAdWithAdTypes:options:)\n\n `\n ` \n Asks the adapter to initiate an asynchronous native ad request. \\|adTypes\\| contains the list of\n native ad types requested. See GADAdLoaderAdTypes.h for available ad types. \\|options\\| contains\n additional options configured by the publisher. See GADNativeAdImageAdLoaderOptions.h for\n available image options.\n\n On ad load success or failure, call adapter:didReceiveNativeAdDataSource:mediationDelegate or\n adapter:didFailAd: on the connector. \n\n #### Declaration\n\n Swift \n\n optional func getNativeAd(with adTypes: [AdLoaderAdType]!, options: [../Classes.html#/c:objc(cs)GADAdLoaderOptions]!)\n\n Objective-C \n\n - (void)getNativeAdWithAdTypes:(NSArray\u003c../Type-Definitions.html#/c:GADAdLoaderAdTypes.h@T@GADAdLoaderAdType\u003e *)adTypes\n options:(NSArray\u003c../Classes.html#/c:objc(cs)GADAdLoaderOptions *\u003e *)options;\n\n- `\n ``\n ``\n `\n\n ### [-handlesUserClicks](#/c:objc(pl)GADMAdNetworkAdapter(im)handlesUserClicks)\n\n `\n ` \n Indicates if the adapter handles user clicks. If the adapter returns YES, it must handle user\n clicks and notify the Google Mobile Ads SDK of clicks using\n +\\[GADMediatedNativeAdNotificationSource mediatedNativeAdDidRecordClick:\\]. If the adapter returns\n NO, the Google Mobile Ads SDK handles user clicks and notifies the adapter of clicks using\n -\\[GADMediatedUnifiedNativeAd didRecordClickOnAssetWithName:view:viewController:\\]. \n\n #### Declaration\n\n Swift \n\n optional func handlesUserClicks() -\u003e Bool\n\n Objective-C \n\n - (BOOL)handlesUserClicks;\n\n- `\n ``\n ``\n `\n\n ### [-handlesUserImpressions](#/c:objc(pl)GADMAdNetworkAdapter(im)handlesUserImpressions)\n\n `\n ` \n Indicates if the adapter handles user impressions tracking. If the adapter returns YES, the\n Google Mobile Ads SDK will not track user impressions and the adapter must notify the\n Google Mobile Ads SDK of impressions using +\\[GADMediatedNativeAdNotificationSource\n mediatedNativeAdDidRecordImpression:\\]. If the adapter returns NO, the Google Mobile Ads SDK\n tracks user impressions and notifies the adapter of impressions using\n -\\[GADMediatedUnifiedNativeAd didRecordImpression\\]. \n\n #### Declaration\n\n Swift \n\n optional func handlesUserImpressions() -\u003e Bool\n\n Objective-C \n\n - (BOOL)handlesUserImpressions;\n\n- `\n ``\n ``\n `\n\n ### [-changeAdSizeTo:](#/c:objc(pl)GADMAdNetworkAdapter(im)changeAdSizeTo:)\n\n `\n ` \n If your ad network handles multiple ad sizes for the same banner ad, implement this method to be\n informed of banner size updates. Ad sizes typically change between kGADAdSizeSmartBannerPortrait\n and kGADAdSizeSmartBannerLandscape. If this method is not implemented, the ad is removed from\n the user interface when the size changes. \n\n #### Declaration\n\n Swift \n\n optional func changeAdSize(to adSize: AdSize)\n\n Objective-C \n\n - (void)changeAdSizeTo:(../Structs/GADAdSize.html)adSize;"]]