GoogleMobileAds Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
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
-
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
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.
[null,null,["Last updated 2025-08-20 UTC."],[[["\u003cp\u003e\u003ccode\u003eGADQueryInfo\u003c/code\u003e objects store query information used in Google ad requests.\u003c/p\u003e\n"],["\u003cp\u003eIt primarily provides a \u003ccode\u003equery\u003c/code\u003e string property for this purpose.\u003c/p\u003e\n"],["\u003cp\u003eDeprecated methods for creating \u003ccode\u003eGADQueryInfo\u003c/code\u003e instances suggest using \u003ccode\u003eGADMobileAds generateSignal:completionHandler:\u003c/code\u003e instead.\u003c/p\u003e\n"],["\u003cp\u003eFor using \u003ccode\u003eadUnitID\u003c/code\u003e, set it within a \u003ccode\u003eGADSignalRequest\u003c/code\u003e subclass when using the recommended \u003ccode\u003egenerateSignal\u003c/code\u003e method.\u003c/p\u003e\n"]]],[],null,["# GoogleMobileAds Framework Reference\n\nGADQueryInfo\n============\n\n\n @interface GADQueryInfo : NSObject\n\nQuery info used in requests.\n- `\n ``\n ``\n `\n\n ### [query](#/c:objc(cs)GADQueryInfo(py)query)\n\n `\n ` \n Query string used in requests. \n\n #### Declaration\n\n Swift \n\n var query: String { get }\n\n Objective-C \n\n @property (nonatomic, readonly, nonnull) NSString *query;\n\n[Deprecated\n----------](#/Deprecated)\n\n- `\n ``\n ``\n `\n\n ### [+createQueryInfoWithRequest:adFormat:completionHandler:](#/c:objc(cs)GADQueryInfo(cm)createQueryInfoWithRequest:adFormat:completionHandler:)\n\n `\n ` \n Deprecated\n\n Use +\\[GADMobileAds generateSignal:completionHandler:\\] instead. \n Deprecated. Use +\\[GADMobileAds generateSignal:completionHandler:\\] instead.\n\n Creates query info that can be used as input in a Google request. Calls completionHandler\n asynchronously on the main thread once query info has been created or when an error occurs. \n\n #### Declaration\n\n Swift \n\n class func createQueryInfo(with request: Request?, adFormat: AdFormat) async throws -\u003e QueryInfo\n\n Objective-C \n\n + (void)createQueryInfoWithRequest:(nullable ../Classes/GADRequest.html *)request\n adFormat:(../Enums/GADAdFormat.html)adFormat\n completionHandler:\n (nonnull ../Type-Definitions.html#/c:GADQueryInfo.h@T@GADQueryInfoCreationCompletionHandler)\n completionHandler;\n\n- `\n ``\n ``\n `\n\n ### [+createQueryInfoWithRequest:adFormat:adUnitID:completionHandler:](#/c:objc(cs)GADQueryInfo(cm)createQueryInfoWithRequest:adFormat:adUnitID:completionHandler:)\n\n `\n ` \n Deprecated\n\n Use +\\[GADMobileAds generateSignal:completionHandler:\\] instead. Set adUnitID in the GADSignalRequest subclass. \n Deprecated. Use +\\[GADMobileAds generateSignal:completionHandler:\\] instead. Set adUnitID in the\n GADSignalRequest subclass.\n\n Creates query info for adUnitID that can be used as input in a Google\n request. Calls completionHandler asynchronously on the main thread once query info has been\n created or when an error occurs. \n\n #### Declaration\n\n Swift \n\n class func createQueryInfo(with request: Request?, adFormat: AdFormat, adUnitID: String) async throws -\u003e QueryInfo\n\n Objective-C \n\n + (void)createQueryInfoWithRequest:(nullable ../Classes/GADRequest.html *)request\n adFormat:(../Enums/GADAdFormat.html)adFormat\n adUnitID:(nonnull NSString *)adUnitID\n completionHandler:\n (nonnull ../Type-Definitions.html#/c:GADQueryInfo.h@T@GADQueryInfoCreationCompletionHandler)\n completionHandler;"]]