GoogleMobileAds Framework Reference

GADMediationAdRequest

@protocol GADMediationAdRequest <NSObject>

Provides information which can be used for making ad requests during mediation.

  • Publisher ID set by the publisher on the AdMob frontend.

    Declaration

    Objective-C

    - (nullable NSString *)publisherId;
  • Mediation configurations set by the publisher on the AdMob frontend.

    Declaration

    Objective-C

    - (nullable NSDictionary *)credentials;
  • Returns YES if the publisher is requesting test ads.

    Declaration

    Objective-C

    - (BOOL)testMode;
  • The adapter’s ad network extras specified in GADRequest.

    Declaration

    Objective-C

    - (nullable id<GADAdNetworkExtras>)networkExtras;
  • Returns the value of childDirectedTreatment supplied by the publisher. Returns nil if the publisher hasn’t specified child directed treatment. Returns @YES if child directed treatment is enabled.

    Declaration

    Objective-C

    - (nullable NSNumber *)childDirectedTreatment;
  • Returns the maximum ad content rating supplied by the publisher. Returns nil if the publisher hasn’t specified a max ad content rating.

    Declaration

    Objective-C

    - (nullable GADMaxAdContentRating)maxAdContentRating;
  • Returns the value of underAgeOfConsent supplied by the publisher. Returns nil if the publisher hasn’t specified the user is under the age of consent. Returns @YES if the user is under the age of consent.

    Declaration

    Objective-C

    - (nullable NSNumber *)underAgeOfConsent;
  • Returns YES if the publisher has specified latitude and longitude location.

    Declaration

    Objective-C

    - (BOOL)userHasLocation;
  • Returns the user’s latitude or 0 if location isn’t specified.

    Declaration

    Objective-C

    - (CGFloat)userLatitude;
  • Returns the user’s longitude or 0 if location isn’t specified.

    Declaration

    Objective-C

    - (CGFloat)userLongitude;
  • Returns the user’s location accuracy or 0 if location isn’t specified.

    Declaration

    Objective-C

    - (CGFloat)userLocationAccuracyInMeters;
  • Returns user’s location description. May return a value even if userHasLocation is NO.

    Declaration

    Objective-C

    - (nullable NSString *)userLocationDescription;
  • Keywords describing the user’s current activity. Example: @Sport Scores.

    Declaration

    Objective-C

    - (nullable NSArray *)userKeywords;
  • Deprecated. The end user’s gender set by the publisher in GADRequest. Returns kGADGenderUnknown if it has not been specified.

    Declaration

    Objective-C

    - (GADGender)userGender;
  • Deprecated. The end user’s birthday set by the publisher. Returns nil if it has not been specified.

    Declaration

    Objective-C

    - (nullable NSDate *)userBirthday;