SearchInAppsSDK Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
ContextualSearchRuntime
@interface ContextualSearchRuntime : NSObject
Runtime for issuing contextual search requests.
The runtime can be reused across the app after it is initialized.
-
Creates a new Search Runtime.
The Search Runtime can be created at app startup and only needs to be
created once. It can be reused throuhgout the app’s lifecycle.
Declaration
Objective-C
- (nonnull instancetype)init;
-
Gets search suggestions.
\param withOptions The input options used to generate search suggestions.
Declaration
Objective-C
- (void)getSearchSuggestionsWithOptions:
(GetSearchSuggestionsOptions *_Nonnull)getSearchSuggestionsOptions
completionHandler:
(void (^_Nonnull)(SearchSuggestions *_Nullable,
NSError *_Nullable))
completionHandler;
-
Gets trending searches.
\param withOptions The input options used to generate trending searches.
Declaration
Objective-C
- (void)getTrendingSearchesWithOptions:
(GetTrendingSearchesOptions *_Nullable)getTrendingSearchesOptions
completionHandler:
(void (^_Nonnull)(SearchSuggestions *_Nullable,
NSError *_Nullable))
completionHandler;
-
Gets search content.
\param withOptions The input options used to generate search content.
Declaration
Objective-C
- (void)getSearchContentWithOptions:(GetSearchContentOptions *_Nonnull)options
completionHandler:
(void (^_Nonnull)(SearchContents *_Nullable,
NSError *_Nullable))completionHandler;
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."],[[["ContextualSearchRuntime enables issuing contextual search requests and can be reused throughout the app's lifecycle."],["It provides methods for retrieving search suggestions based on input options."],["It allows fetching trending searches using optional input parameters."],["Developers can get search content by specifying search options through this runtime."]]],["`ContextualSearchRuntime` is a reusable object for contextual search requests, initialized once at app startup. It can perform three main actions: retrieve search suggestions via `getSearchSuggestionsWithOptions:completionHandler:`, fetch trending searches with `getTrendingSearchesWithOptions:completionHandler:`, and obtain search content using `getSearchContentWithOptions:completionHandler:`. Each of these methods requires input options and provides results through a completion handler, which can return either search-related data or an error.\n"]]