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

  • GADMediationAdConfiguration is provided by the Google Mobile Ads SDK for adapters to render ads and contains 3PAS and other ad configuration information.

  • It includes properties for the ad string (bidResponse), the view controller to present from (topViewController), publisher-set mediation configuration (credentials), watermark data (watermark), and publisher extras (extras).

  • The configuration also indicates if the publisher is requesting test ads (isTestRequest).

GADMediationAdConfiguration


@interface GADMediationAdConfiguration : NSObject

Provided by the Google Mobile Ads SDK for the adapter to render the ad. Contains 3PAS and other ad configuration information.

  • The ad string returned from the 3PAS.

    Declaration

    Swift

    var bidResponse: String? { get }

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *bidResponse;
  • View controller to present from. This value must be read at presentation time to obtain the most recent value. Must be accessed on the main queue.

    Declaration

    Swift

    var topViewController: UIViewController? { get }

    Objective-C

    @property (nonatomic, readonly, nullable) UIViewController *topViewController;
  • Mediation configuration set by the publisher on the AdMob frontend.

    Declaration

    Swift

    var credentials: MediationCredentials { get }

    Objective-C

    @property (nonatomic, readonly, nonnull) GADMediationCredentials *credentials;
  • PNG data containing a watermark that identifies the ad’s source.

    Declaration

    Swift

    var watermark: Data? { get }

    Objective-C

    @property (nonatomic, readonly, nullable) NSData *watermark;
  • Extras the publisher registered with -[GADRequest registerAdNetworkExtras:].

    Declaration

    Swift

    var extras: (any AdNetworkExtras)? { get }

    Objective-C

    @property (nonatomic, readonly, nullable) id<GADAdNetworkExtras> extras;
  • Indicates whether the publisher is requesting test ads.

    Declaration

    Swift

    var isTestRequest: Bool { get }

    Objective-C

    @property (nonatomic, readonly) BOOL isTestRequest;

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.