AI-generated Key Takeaways
-
GetSearchContentOptionsenables requesting search content with various parameters like location, text, and client ID. -
It allows customization of the request by specifying the number of content blocks (
blockCount) and alternative client IDs (clientId). -
Developers can initialize
GetSearchContentOptionswith location context, search repeat text, or text context for generating tailored search suggestions. -
Location-based search suggestions are driven by
locationContext, whilesearchRepeatprovides text used for Google search query generation. -
textContextoffers text strings for generating query-based search suggestions, potentially enhancing search relevance and diversity.
GetSearchContentOptions
@objc
final class GetSearchContentOptionsThis class contains all the options necessary to request search content.
-
The number of content blocks to request. The number returned may be fewer than this. Defaults to 1.
Declaration
Swift
@objc final var blockCount: Int -
The client ID used to request search content if it is different from the client ID specified in Info.plist.
Declaration
Swift
@objc final var clientId: String? -
Creates options with given location data (i.e. the location context used for generating location-based search suggestions).
Declaration
Swift
@objc init(locationContext: [LocationSuggestionsContext]) -
Creates options with given search repeat text (i.e. the string used for generating the Google search query).
Declaration
Swift
@objc init(searchRepeat: String) -
Create options with a given text context (i.e. the strings used for generating search content).
Declaration
Swift
@objc init(textContext: [String]) -
The information used to generate location-based search suggestions.
Declaration
Swift
@objc final var locationContext: [LocationSuggestionsContext]? -
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
Swift
@objc final var searchRepeat: String? -
The text used to generate query-based search suggestions.
Declaration
Swift
@objc final var textContext: [String]?