SearchInAppsSDK Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GetSearchContentOptions
@interface GetSearchContentOptions : NSObject <NSCopying>
This class contains all the options necessary to request search content.
-
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 search repeat text used to generate the Google search query. The returned query might not
be exactly the same as the search repeat text.
Declaration
Objective-C
@property (nonatomic, copy) NSString *_Nullable searchRepeat;
-
The number of content blocks to request. The number returned may be fewer than this. Defaults to 1.
Declaration
Objective-C
@property (nonatomic) NSInteger blockCount;
-
The client ID used to request search content 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
content).
\param textContext A list of strings used to generate search content.
Declaration
Objective-C
- (nonnull instancetype)initWithTextContext:
(NSArray<NSString *> *_Nonnull)textContext;
-
Creates 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.
-
Creates options with given search repeat text (i.e. the string used for generating the Google
search query).
\param searchRepeat A string used to generate the Google search query.
Declaration
Objective-C
- (nonnull instancetype)initWithSearchRepeat:(NSString *_Nonnull)searchRepeat;
-
Declaration
Objective-C
- (id _Nonnull)copyWithZone:(struct _NSZone * _Nullable)zone SWIFT_WARN_UNUSED_RESULT;
-
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\u003eGetSearchContentOptions\u003c/code\u003e enables requesting search content with various parameters.\u003c/p\u003e\n"],["\u003cp\u003eIt supports text, location, and search repeat inputs for generating search suggestions.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can specify the desired number of content blocks and a custom client ID.\u003c/p\u003e\n"],["\u003cp\u003eInitialization methods are provided for creating options based on different input types.\u003c/p\u003e\n"],["\u003cp\u003eIt inherits from \u003ccode\u003eNSObject\u003c/code\u003e and conforms to the \u003ccode\u003eNSCopying\u003c/code\u003e protocol for object copying.\u003c/p\u003e\n"]]],["`GetSearchContentOptions` facilitates search content requests, offering customizable parameters. Key actions include setting `textContext` for query-based suggestions, `locationContext` for location-based suggestions, and `searchRepeat` for generating Google search queries. It also allows specifying `blockCount` for the number of content blocks and `clientId`. The class offers initializers for text, location, and search repeat. The default initializer `init` and `new` are unavailable. `copyWithZone:` is available.\n"],null,["# SearchInAppsSDK Framework Reference\n\nGetSearchContentOptions\n=======================\n\n\n @interface GetSearchContentOptions : NSObject \u003cNSCopying\u003e\n\nThis class contains all the options necessary to request search content.\n- `\n ``\n ``\n `\n\n ### [textContext](#/c:@M@SearchInAppsSDK@objc(cs)GetSearchContentOptions(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)GetSearchContentOptions(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 ### [searchRepeat](#/c:@M@SearchInAppsSDK@objc(cs)GetSearchContentOptions(py)searchRepeat)\n\n `\n ` \n The search repeat text used to generate the Google search query. The returned query might not\n be exactly the same as the search repeat text. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic, copy) NSString *_Nullable searchRepeat;\n\n- `\n ``\n ``\n `\n\n ### [blockCount](#/c:@M@SearchInAppsSDK@objc(cs)GetSearchContentOptions(py)blockCount)\n\n `\n ` \n The number of content blocks to request. The number returned may be fewer than this. Defaults to 1. \n\n #### Declaration\n\n Objective-C \n\n @property (nonatomic) NSInteger blockCount;\n\n- `\n ``\n ``\n `\n\n ### [clientId](#/c:@M@SearchInAppsSDK@objc(cs)GetSearchContentOptions(py)clientId)\n\n `\n ` \n The client ID used to request search content 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)GetSearchContentOptions(im)initWithTextContext:)\n\n `\n ` \n Create options with a given text context (i.e. the strings used for generating search\n content).\n \\\\param textContext A list of strings used to generate search content. \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)GetSearchContentOptions(im)initWithLocationContext:)\n\n `\n ` \n Creates 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 ### [-initWithSearchRepeat:](#/c:@M@SearchInAppsSDK@objc(cs)GetSearchContentOptions(im)initWithSearchRepeat:)\n\n `\n ` \n Creates options with given search repeat text (i.e. the string used for generating the Google\n search query).\n \\\\param searchRepeat A string used to generate the Google search query. \n\n #### Declaration\n\n Objective-C \n\n - (nonnull instancetype)initWithSearchRepeat:(NSString *_Nonnull)searchRepeat;\n\n- `\n ``\n ``\n `\n\n ### [-copyWithZone:](#/c:@M@SearchInAppsSDK@objc(cs)GetSearchContentOptions(im)copyWithZone:)\n\n `\n ` \n Undocumented \n\n #### Declaration\n\n Objective-C \n\n - (id _Nonnull)copyWithZone:(struct ../Structs.html#/c:@S@_NSZone * _Nullable)zone SWIFT_WARN_UNUSED_RESULT;\n\n- `\n ``\n ``\n `\n\n ### [-init](#/c:@M@SearchInAppsSDK@objc(cs)GetSearchContentOptions(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)GetSearchContentOptions(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\");"]]