SearchInAppsSDK Framework Reference

  • The GetSearchSuggestionsOptions class is used to configure and request search suggestions within an application.

  • It allows specifying a clientId for authentication, overriding the default one from Info.plist.

  • Developers can provide either locationContext or textContext to generate location-based or query-based suggestions, respectively.

  • locationContext uses LocationSuggestionsContext objects, while textContext utilizes an array of strings for input.

GetSearchSuggestionsOptions

@objc
final class GetSearchSuggestionsOptions

This 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]?