GADMAdNetworkConnector
protocol GADMAdNetworkConnector : GADMediationAdRequest
Ad network adapters interact with the mediation SDK using an object that implements the GADMAdNetworkConnector protocol. The connector object can be used to obtain necessary information for ad requests, and to call back to the mediation SDK on ad request returns and user interactions.
-
When you need to show a landing page or any other modal view, such as when a user clicks or when your Ads SDK needs to show an interstitial, use this method to obtain a UIViewController that you can use to show your modal view. Call the -presentViewController:animated:completion: method of the returned UIViewController.
Declaration
Swift
func viewControllerForPresentingModalView() -> UIViewController!
-
Returns the preferred ad volume as a fraction of system volume (0.0 to 1.0).
Declaration
Swift
func adVolume() -> Float
-
Returns whether the ad should be muted.
Declaration
Swift
func adMuted() -> Bool
-
Tells the connector that the adapter failed to receive an ad.
Declaration
Swift
func adapter(_ adapter: GADMAdNetworkAdapter!, didFailAd error: Error!)
-
Tells the connector that the adapter received a banner ad.
Declaration
Swift
func adapter(_ adapter: GADMAdNetworkAdapter!, didReceiveAdView view: UIView!)
-
Tells the connector that the adapter received an interstitial.
Declaration
Swift
func adapterDidReceiveInterstitial(_ adapter: GADMAdNetworkAdapter!)
-
Tells the connector that the adapter has received a mediated native ad. |mediatedNativeAd| is used by the Google Mobile Ads SDK to construct a native ad object.
Declaration
Swift
func adapter(_ adapter: GADMAdNetworkAdapter!, didReceive mediatedNativeAd: GADMediatedNativeAd!)
-
Tells the connector that the adapter has received a unified mediated native ad. mediatedUnifiedNativeAd is used by the Google Mobile Ads SDK to construct a unified native ad object.
Declaration
Swift
func adapter(_ adapter: GADMAdNetworkAdapter!, didReceive mediatedUnifiedNativeAd: GADMediatedUnifiedNativeAd!)
-
Tells the connector that the adapter recorded a user click.
Declaration
Swift
func adapterDidGetAdClick(_ adapter: GADMAdNetworkAdapter!)
-
Tells the connector that the adapter will leave the application because of a user action.
Declaration
Swift
func adapterWillLeaveApplication(_ adapter: GADMAdNetworkAdapter!)
-
Tells the connector that the adapter will present a full screen modal.
Declaration
Swift
func adapterWillPresentFullScreenModal(_ adapter: GADMAdNetworkAdapter!)
-
Tells the connector that the adapter will dismiss a full screen modal.
Declaration
Swift
func adapterWillDismissFullScreenModal(_ adapter: GADMAdNetworkAdapter!)
-
Tells the connector that the adapter dismissed a full screen modal.
Declaration
Swift
func adapterDidDismissFullScreenModal(_ adapter: GADMAdNetworkAdapter!)
-
Tells the connector that the adapter will present an interstitial.
Declaration
Swift
func adapterWillPresentInterstitial(_ adapter: GADMAdNetworkAdapter!)
-
Tells the connector that the adapter will dismiss an interstitial.
Declaration
Swift
func adapterWillDismissInterstitial(_ adapter: GADMAdNetworkAdapter!)
-
Tells the connector that the adapter did dismiss an interstitial.
Declaration
Swift
func adapterDidDismissInterstitial(_ adapter: GADMAdNetworkAdapter!)
-
Deprecated. Use -adapterDidReceiveInterstitial:.
Declaration
Swift
func adapter(_ adapter: GADMAdNetworkAdapter!, didReceiveInterstitial interstitial: NSObject!)
-
Deprecated. Use -adapterDidGetAdClick:.
Declaration
Swift
func adapter(_ adapter: GADMAdNetworkAdapter!, clickDidOccurInBanner view: UIView!)
-
Deprecated. Use -adapter:didFailAd:.
Declaration
Swift
func adapter(_ adapter: GADMAdNetworkAdapter!, didFailInterstitial error: Error!)