GADMediationAdapter
protocol GADMediationAdapter : NSObjectProtocol
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
Swift
static func version() -> GADVersionNumber
-
Returns the ad SDK version.
Declaration
Swift
static func adSDKVersion() -> GADVersionNumber
-
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
Swift
static func networkExtrasClass() -> GADAdNetworkExtras.Type?
-
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
Swift
optional static func setUpWith(_ configuration: GADMediationServerConfiguration, completionHandler: @escaping GADMediationAdapterSetUpCompletionBlock)
-
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
Swift
optional func loadBanner(for adConfiguration: GADMediationBannerAdConfiguration, completionHandler: @escaping GADMediationBannerLoadCompletionHandler)
-
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
Swift
optional func loadInterstitial(for adConfiguration: GADMediationInterstitialAdConfiguration, completionHandler: @escaping GADMediationInterstitialLoadCompletionHandler)
-
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
Swift
optional func loadNativeAd(for adConfiguration: GADMediationNativeAdConfiguration, completionHandler: @escaping GADMediationNativeLoadCompletionHandler)
-
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
Swift
optional func loadRewardedAd(for adConfiguration: GADMediationRewardedAdConfiguration, completionHandler: @escaping GADMediationRewardedLoadCompletionHandler)
-
Deprecated. To be removed before launch. Use setUpWithConfiguration:completionHandler:.
Declaration
Swift
optional static func setUp()
-
Deprecated. To be removed before launch. Use setUpWithConfiguration:completionHandler:.
Declaration
Swift
optional static func update(_ configuration: GADMediationServerConfiguration)