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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-20 UTC."],[[["\u003cp\u003e\u003ccode\u003eGADQueryInfo\u003c/code\u003e stores query information used in Google ad requests.\u003c/p\u003e\n"],["\u003cp\u003eIt includes a \u003ccode\u003equery\u003c/code\u003e property representing the query string.\u003c/p\u003e\n"],["\u003cp\u003eThe methods to create \u003ccode\u003eGADQueryInfo\u003c/code\u003e instances, \u003ccode\u003ecreateQueryInfoWithRequest:adFormat:completionHandler:\u003c/code\u003e and \u003ccode\u003ecreateQueryInfoWithRequest:adFormat:adUnitID:completionHandler:\u003c/code\u003e, are deprecated in favor of \u003ccode\u003eGADMobileAds generateSignal:completionHandler:\u003c/code\u003e.\u003c/p\u003e\n"]]],["GADQueryInfo provides a query string for Google requests, accessible via the `query` property. The methods `createQueryInfoWithRequest:adFormat:completionHandler:` and `createQueryInfoWithRequest:adFormat:adUnitID:completionHandler:` are deprecated. They were previously used to create query info objects asynchronously, handling requests, ad formats, and optionally, an ad unit ID. These functionalities have been replaced by `+[GADMobileAds generateSignal:completionHandler:]`, which is the recommended alternative. The adUnitID should be set in the `GADSignalRequest` subclass instead.\n"],null,["GADQueryInfo \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 Query string used in requests. \n\n Declaration \n Swift \n\n var query: String { get }\n\n Objective-C \n\n @property (nonatomic, readonly, nonnull) NSString *query;\n\n[Deprecated](#/Deprecated)\n\n- `\n ``\n ``\n `\n\n [+createQueryInfoWithRequest:adFormat:completionHandler:](#/c:objc(cs)GADQueryInfo(cm)createQueryInfoWithRequest:adFormat:completionHandler:)`\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 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 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 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;"]]