GoogleMobileAds Framework Reference

  • GADAdNetworkResponseInfo provides metadata about an ad network's response within an ad request, including details like the ad network's class name and any errors encountered.

  • It contains information about the ad source, such as name, ID, instance name, and instance ID, which might be nil if not provided by the ad server.

  • Developers can access network configuration, latency, and a dictionary representation of the response for analysis and debugging purposes.

  • The error property indicates any issues during ad loading, while latency reveals the time taken by the ad network.

  • adUnitMapping provides insights into the network configuration as set on the AdMob UI.

GADAdNetworkResponseInfo


@interface GADAdNetworkResponseInfo : NSObject

Response metadata for an individual ad network in an ad response.

  • A class name that identifies the ad network.

    Declaration

    Swift

    var adNetworkClassName: String { get }

    Objective-C

    @property (nonatomic, readonly, nonnull) NSString *adNetworkClassName;
  • Network configuration set on the AdMob UI.

    Declaration

    Swift

    var adUnitMapping: [String : Any] { get }

    Objective-C

    @property (nonatomic, readonly, nonnull) NSDictionary<NSString *, id> *adUnitMapping;
  • The ad source name associated with this ad network response. Nil if the ad server does not populate this field.

    Declaration

    Swift

    var adSourceName: String? { get }

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *adSourceName;
  • The ad source ID associated with this ad network response. Nil if the ad server does not populate this field.

    Declaration

    Swift

    var adSourceID: String? { get }

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *adSourceID;
  • The ad source instance name associated with this ad network response. Nil if the ad server does not populate this field.

    Declaration

    Swift

    var adSourceInstanceName: String? { get }

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *adSourceInstanceName;
  • The ad source instance ID associated with this ad network response. Nil if the ad server does not populate this field.

    Declaration

    Swift

    var adSourceInstanceID: String? { get }

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *adSourceInstanceID;
  • Error associated with the request to the network. Nil if the network successfully loaded an ad or if the network was not attempted.

    Declaration

    Swift

    var error: (any Error)? { get }

    Objective-C

    @property (nonatomic, readonly, nullable) NSError *error;
  • Amount of time the ad network spent loading an ad. 0 if the network was not attempted.

    Declaration

    Swift

    var latency: TimeInterval { get }

    Objective-C

    @property (nonatomic, readonly) NSTimeInterval latency;
  • JSON-safe dictionary representation of the ad network response info.

    Declaration

    Swift

    var dictionaryRepresentation: [String : Any] { get }

    Objective-C

    @property (nonatomic, readonly, nonnull) NSDictionary<NSString *, id> *dictionaryRepresentation;