Share your feedback and help shape the Google Mobile Ads SDK roadmap. Take the Google Mobile Ads SDK Annual Survey for 2023 before it closes on May 5th, 2023.

GoogleMobileAds Framework Reference

Stay organized with collections Save and categorize content based on your preferences.

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: GADMediationCredentials { 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: GADAdNetworkExtras? { get }

    Objective-C

    @property (nonatomic, readonly, nullable) id<GADAdNetworkExtras> extras;
  • The value of childDirectedTreatment supplied by the publisher. Is nil if the publisher hasn’t specified child directed treatment. Is @YES if child directed treatment is enabled.

    Declaration

    Swift

    var childDirectedTreatment: NSNumber? { get }

    Objective-C

    @property (nonatomic, readonly, nullable) NSNumber *childDirectedTreatment;
  • Indicates whether the publisher is requesting test ads.

    Declaration

    Swift

    var isTestRequest: Bool { get }

    Objective-C

    @property (nonatomic, readonly) BOOL isTestRequest;
  • Deprecated and unsupported. Always returns NO.

    Declaration

    Swift

    var hasUserLocation: Bool { get }

    Objective-C

    @property (nonatomic, readonly) BOOL hasUserLocation;
  • Deprecated and unsupported. Always returns 0.

    Declaration

    Swift

    var userLatitude: CGFloat { get }

    Objective-C

    @property (nonatomic, readonly) CGFloat userLatitude;
  • Deprecated and unsupported. Always returns 0.

    Declaration

    Swift

    var userLongitude: CGFloat { get }

    Objective-C

    @property (nonatomic, readonly) CGFloat userLongitude;
  • Deprecated and unsupported. Always returns 0.

    Declaration

    Swift

    var userLocationAccuracyInMeters: CGFloat { get }

    Objective-C

    @property (nonatomic, readonly) CGFloat userLocationAccuracyInMeters;