SearchInAppsSDK Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GetSearchSuggestionsOptions
@interface GetSearchSuggestionsOptions : NSObject
This class contains all the options necessary to request search suggestions.
-
The text used to generate query-based search suggestions.
Declaration
Objective-C
@property (nonatomic, copy) NSArray<NSString *> *_Nullable textContext;
-
The information used to generate location-based search suggestions.
-
The client ID used to request search suggestions if it is different from the
client ID specified in Info.plist.
Declaration
Objective-C
@property (nonatomic, copy) NSString *_Nullable clientId;
-
Create options with a given text context (i.e. the strings used for generating search
suggestions).
\param textContext A list of strings used to generate search suggestions.
Declaration
Objective-C
- (nonnull instancetype)initWithTextContext:
(NSArray<NSString *> *_Nonnull)textContext;
-
Create options with given location data (i.e. the location context used for generating
location-based search suggestions).
\param locationContext A list of LocationSuggestionsContext objects used to generate
search suggestions.
-
Declaration
Objective-C
- (nonnull instancetype)init SWIFT_UNAVAILABLE;
-
Unavailable
-init is unavailable
Declaration
Objective-C
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");
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 2024-11-07 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 2024-11-07 UTC."],[[["\u003cp\u003e\u003ccode\u003eGetSearchSuggestionsOptions\u003c/code\u003e enables requesting search suggestions with various parameters.\u003c/p\u003e\n"],["\u003cp\u003eIt uses \u003ccode\u003etextContext\u003c/code\u003e and \u003ccode\u003elocationContext\u003c/code\u003e to generate query and location-based suggestions respectively.\u003c/p\u003e\n"],["\u003cp\u003eA \u003ccode\u003eclientId\u003c/code\u003e can be specified if different from the one in \u003ccode\u003eInfo.plist\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eOptions can be initialized with either text or location contexts using designated initializers.\u003c/p\u003e\n"]]],["The `GetSearchSuggestionsOptions` class configures search suggestion requests. Key properties include `textContext` (strings for query-based suggestions), `locationContext` (location data for location-based suggestions), and `clientId`. You can initialize options using `-initWithTextContext:` with an array of strings, or `-initWithLocationContext:` with `LocationSuggestionsContext` objects. The default `init` and `new` methods are unavailable. These options are essential for specifying the parameters of a search suggestion request.\n"],null,["# SearchInAppsSDK Framework Reference\n\nGetSearchSuggestionsOptions\n===========================\n\n\n @interface GetSearchSuggestionsOptions : NSObject\n\nThis class contains all the options necessary to request search suggestions.\n- `\n ``\n ``\n `\n\n ### [textContext](#/c:@M@SearchInAppsSDK@objc(cs)GetSearchSuggestionsOptions(py)textContext)\n\n `\n ` \n The text used to generate query-based search suggestions. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, copy) NSArray\u003cNSString *\u003e *_Nullable textContext;\n\n- `\n ``\n ``\n `\n\n ### [locationContext](#/c:@M@SearchInAppsSDK@objc(cs)GetSearchSuggestionsOptions(py)locationContext)\n\n `\n ` \n The information used to generate location-based search suggestions. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, copy) NSArray\u003c../Classes/LocationSuggestionsContext.html *\u003e *_Nullable locationContext;\n\n- `\n ``\n ``\n `\n\n ### [clientId](#/c:@M@SearchInAppsSDK@objc(cs)GetSearchSuggestionsOptions(py)clientId)\n\n `\n ` \n The client ID used to request search suggestions if it is different from the\n client ID specified in Info.plist. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, copy) NSString *_Nullable clientId;\n\n- `\n ``\n ``\n `\n\n ### [-initWithTextContext:](#/c:@M@SearchInAppsSDK@objc(cs)GetSearchSuggestionsOptions(im)initWithTextContext:)\n\n `\n ` \n Create options with a given text context (i.e. the strings used for generating search\n suggestions).\n \\\\param textContext A list of strings used to generate search suggestions. \n\n #### Declaration\n\n Objective-C \n\n - (nonnull instancetype)initWithTextContext:\n (NSArray\u003cNSString *\u003e *_Nonnull)textContext;\n\n- `\n ``\n ``\n `\n\n ### [-initWithLocationContext:](#/c:@M@SearchInAppsSDK@objc(cs)GetSearchSuggestionsOptions(im)initWithLocationContext:)\n\n `\n ` \n Create options with given location data (i.e. the location context used for generating\n location-based search suggestions).\n \\\\param locationContext A list of LocationSuggestionsContext objects used to generate\n search suggestions. \n\n #### Declaration\n\n Objective-C \n\n - (nonnull instancetype)initWithLocationContext:\n (NSArray\u003c../Classes/LocationSuggestionsContext.html *\u003e *_Nonnull)locationContext;\n\n- `\n ``\n ``\n `\n\n ### [-init](#/c:@M@SearchInAppsSDK@objc(cs)GetSearchSuggestionsOptions(im)init)\n\n `\n ` \n Unavailable \n Undocumented \n\n #### Declaration\n\n Objective-C \n\n - (nonnull instancetype)init SWIFT_UNAVAILABLE;\n\n- `\n ``\n ``\n `\n\n ### [+new](#/c:@M@SearchInAppsSDK@objc(cs)GetSearchSuggestionsOptions(cm)new)\n\n `\n ` \n Unavailable\n\n -init is unavailable \n Undocumented \n\n #### Declaration\n\n Objective-C \n\n + (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG(\"-init is unavailable\");"]]