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

  • GADQueryInfo stores query information used in Google ad requests.

  • It includes a query property representing the query string.

  • The methods to create GADQueryInfo instances, createQueryInfoWithRequest:adFormat:completionHandler: and createQueryInfoWithRequest:adFormat:adUnitID:completionHandler:, are deprecated in favor of GADMobileAds generateSignal:completionHandler:.

GADQueryInfo


@interface GADQueryInfo : NSObject

Query info used in requests.

  • Query string used in requests.

    Declaration

    Swift

    var query: String { get }

    Objective-C

    @property (nonatomic, readonly, nonnull) NSString *query;
  • Deprecated

    Use +[GADMobileAds generateSignal:completionHandler:] instead.

    Deprecated. Use +[GADMobileAds generateSignal:completionHandler:] instead.

    Creates query info that can be used as input in a Google request. Calls completionHandler asynchronously on the main thread once query info has been created or when an error occurs.

    Declaration

    Swift

    class func createQueryInfo(with request: Request?, adFormat: AdFormat) async throws -> QueryInfo

    Objective-C

    + (void)createQueryInfoWithRequest:(nullable GADRequest *)request
     adFormat:(GADAdFormat)adFormat
     completionHandler:
     (nonnull GADQueryInfoCreationCompletionHandler)
     completionHandler;
  • Deprecated

    Use +[GADMobileAds generateSignal:completionHandler:] instead. Set adUnitID in the GADSignalRequest subclass.

    Deprecated. Use +[GADMobileAds generateSignal:completionHandler:] instead. Set adUnitID in the GADSignalRequest subclass.

    Creates query info for adUnitID that can be used as input in a Google request. Calls completionHandler asynchronously on the main thread once query info has been created or when an error occurs.

    Declaration

    Swift

    class func createQueryInfo(with request: Request?, adFormat: AdFormat, adUnitID: String) async throws -> QueryInfo

    Objective-C

    + (void)createQueryInfoWithRequest:(nullable GADRequest *)request
     adFormat:(GADAdFormat)adFormat
     adUnitID:(nonnull NSString *)adUnitID
     completionHandler:
     (nonnull GADQueryInfoCreationCompletionHandler)
     completionHandler;

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.