GoogleMobileAds Framework Reference

  • The GADMAdNetworkConnector protocol facilitates communication between ad network adapters and the Google Mobile Ads SDK.

  • Adapters use the connector to get information like ad volume and preferred view controllers for presenting ads.

  • The GADMAdNetworkConnector protocol includes callbacks to inform the Google Mobile Ads SDK about ad events, like receiving an ad or an ad click.

  • Several older methods of the GADMAdNetworkConnector are now deprecated and should no longer be used.

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!

    Objective-C

    - (UIViewController *)viewControllerForPresentingModalView;
  • Returns the preferred ad volume as a fraction of system volume (0.0 to 1.0).

    Declaration

    Swift

    func adVolume() -> Float

    Objective-C

    - (float)adVolume;
  • Returns whether the ad should be muted.

    Declaration

    Swift

    func adMuted() -> Bool

    Objective-C

    - (BOOL)adMuted;