AI-generated Key Takeaways
-
GetSearchContentOptionsenables requesting search content with various parameters. -
It supports text, location, and search repeat inputs for generating search suggestions.
-
Developers can specify the desired number of content blocks and a custom client ID.
-
Initialization methods are provided for creating options based on different input types.
-
It inherits from
NSObjectand conforms to theNSCopyingprotocol for object copying.
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.
Declaration
Objective-C
@property (nonatomic, copy) NSArray<LocationSuggestionsContext *> *_Nullable locationContext; -
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.
Declaration
Objective-C
- (nonnull instancetype)initWithLocationContext: (NSArray<LocationSuggestionsContext *> *_Nonnull)locationContext; -
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; -
Undocumented
Declaration
Objective-C
- (id _Nonnull)copyWithZone:(struct _NSZone * _Nullable)zone SWIFT_WARN_UNUSED_RESULT; -
Unavailable
Undocumented
Declaration
Objective-C
- (nonnull instancetype)init SWIFT_UNAVAILABLE; -
Unavailable
-init is unavailable
Undocumented
Declaration
Objective-C
+ (nonnull instancetype)new SWIFT_UNAVAILABLE_MSG("-init is unavailable");