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

    Swift

    func publisherId() -> String!

    Objective-C

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

    Declaration

    Swift

    func credentials() -> [AnyHashable : Any]!

    Objective-C

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

    Declaration

    Swift

    func testMode() -> Bool

    Objective-C

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

    Declaration

    Swift

    func networkExtras() -> Any!

    Objective-C

    - (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

    Swift

    func childDirectedTreatment() -> NSNumber!

    Objective-C

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

    Declaration

    Swift

    func userGender() -> Any!

    Objective-C

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

    Declaration

    Swift

    func userBirthday() -> Date!

    Objective-C

    - (NSDate *)userBirthday;
  • Returns YES if the publisher has specified latitude and longitude location.

    Declaration

    Swift

    func userHasLocation() -> Bool

    Objective-C

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

    Declaration

    Swift

    func userLatitude() -> CGFloat

    Objective-C

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

    Declaration

    Swift

    func userLongitude() -> CGFloat

    Objective-C

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

    Declaration

    Swift

    func userLocationAccuracyInMeters() -> CGFloat

    Objective-C

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

    Declaration

    Swift

    func userLocationDescription() -> String!

    Objective-C

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

    Declaration

    Swift

    func userKeywords() -> [Any]!

    Objective-C

    - (NSArray *)userKeywords;