AI-generated Key Takeaways
-
The
GetSearchSuggestionsOptionsclass is used to configure and request search suggestions within an application. -
It allows specifying a
clientIdfor authentication, overriding the default one from Info.plist. -
Developers can provide either
locationContextortextContextto generate location-based or query-based suggestions, respectively. -
locationContextusesLocationSuggestionsContextobjects, whiletextContextutilizes an array of strings for input.
GetSearchSuggestionsOptions
@objc
final class GetSearchSuggestionsOptionsThis class contains all the options necessary to request search suggestions.
-
The client ID used to request search suggestions if it is different from the client ID specified in Info.plist.
Declaration
Swift
@objc final var clientId: String? -
Create options with given location data (i.e. the location context used for generating location-based search suggestions).
Declaration
Swift
@objc init(locationContext: [LocationSuggestionsContext]) -
Create options with a given text context (i.e. the strings used for generating search suggestions).
Declaration
Swift
@objc init(textContext: [String]) -
The information used to generate location-based search suggestions.
Declaration
Swift
@objc final var locationContext: [LocationSuggestionsContext]? -
The text used to generate query-based search suggestions.
Declaration
Swift
@objc final var textContext: [String]?