To discuss and provide feedback on our products, join the official AdMob Discord channel in the Google Advertising and Measurement Community server.

GoogleMobileAds Framework Reference

  • The GADMAdNetworkConnector protocol is used by ad network adapters to interact with the mediation SDK.

  • The connector object provides information for ad requests and facilitates callbacks to the mediation SDK on ad request returns and user interactions.

  • The protocol includes methods for obtaining a view controller to present modal views and retrieving preferred ad volume and mute status.

  • The GADMAdNetworkConnector defines callbacks for various ad events, such as ad load success/failure, clicks, and the presentation/dismissal of full-screen modals and interstitials.

  • Several methods within the protocol are marked as deprecated, with recommendations to use alternative methods.

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;

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年08月20日 UTC.