GADMediationAdapter
@protocol GADMediationAdapter <NSObject>
Receives messages and requests from the Google Mobile Ads SDK. Provides GMA to 3P SDK communication.
Adapters are initialized on a background queue and should avoid using the main queue until load time.
-
Returns the adapter version.
Declaration
Objective-C
+ (GADVersionNumber)version;
-
Returns the ad SDK version.
Declaration
Objective-C
+ (GADVersionNumber)adSDKVersion;
-
The extras class that is used to specify additional parameters for a request to this ad network. Returns Nil if the network doesn’t have publisher provided extras.
Declaration
Objective-C
+ (nullable Class<GADAdNetworkExtras>)networkExtrasClass;
-
Tells the adapter to set up its underlying ad network SDK and perform any necessary prefetching or configuration work. The adapter must call completionHandler once the adapter can service ad requests, or if it encounters an error while setting up.
Declaration
Objective-C
+ (void)setUpWithConfiguration: (nonnull GADMediationServerConfiguration *)configuration completionHandler:(nonnull GADMediationAdapterSetUpCompletionBlock) completionHandler;
-
Asks the adapter to load a banner ad with the provided ad configuration. The adapter must call back completionHandler with the loaded ad, or it may call back with an error. This method is called on the main thread, and completionHandler must be called back on the main thread.
Declaration
Objective-C
- (void)loadBannerForAdConfiguration: (nonnull GADMediationBannerAdConfiguration *)adConfiguration completionHandler: (nonnull GADMediationBannerLoadCompletionHandler) completionHandler;
-
Asks the adapter to load an interstitial ad with the provided ad configuration. The adapter must call back completionHandler with the loaded ad, or it may call back with an error. This method is called on the main thread, and completionHandler must be called back on the main thread.
Declaration
Objective-C
- (void) loadInterstitialForAdConfiguration: (nonnull GADMediationInterstitialAdConfiguration *)adConfiguration completionHandler: (nonnull GADMediationInterstitialLoadCompletionHandler) completionHandler;
-
Asks the adapter to load a native ad with the provided ad configuration. The adapter must call back completionHandler with the loaded ad, or it may call back with an error. This method is called on the main thread, and completionHandler must be called back on the main thread.
Declaration
Objective-C
- (void)loadNativeAdForAdConfiguration: (nonnull GADMediationNativeAdConfiguration *)adConfiguration completionHandler: (nonnull GADMediationNativeLoadCompletionHandler) completionHandler;
-
Asks the adapter to load a rewarded ad with the provided ad configuration. The adapter must call back completionHandler with the loaded ad, or it may call back with an error. This method is called on the main thread, and completionHandler must be called back on the main thread.
Declaration
Objective-C
- (void)loadRewardedAdForAdConfiguration: (nonnull GADMediationRewardedAdConfiguration *)adConfiguration completionHandler: (nonnull GADMediationRewardedLoadCompletionHandler) completionHandler;
-
Deprecated. To be removed before launch. Use setUpWithConfiguration:completionHandler:.
Declaration
Objective-C
+ (void)setUp;
-
Deprecated. To be removed before launch. Use setUpWithConfiguration:completionHandler:.
Declaration
Objective-C
+ (void)updateConfiguration: (nonnull GADMediationServerConfiguration *)configuration;