SearchInAppsSDK Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
SearchContents
@available(iOS, introduced: 14)
@objc
final class SearchContents
A collection of search content block data
-
The type of publisher that emits before the object has changed.
Declaration
Swift
@available(iOS, introduced: 14)
typealias ObjectWillChangePublisher = ObservableObjectPublisher
-
Request additional content (if available) using the same options as the original request.
Declaration
Swift
@available(iOS, introduced: 14)
@objc
final func loadMoreContents() async throws -> [SearchContentBlockData]
Return Value
An array containing the additional search content.
-
The set of search content blocks ready to be displayed
Declaration
Swift
@available(iOS, introduced: 14)
@Published
@objc
final var searchContentBlocks: [SearchContentBlockData] { get }
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."],[[["\u003cp\u003e\u003ccode\u003eSearchContents\u003c/code\u003e is a collection of search content block data available in iOS 14 and later.\u003c/p\u003e\n"],["\u003cp\u003eIt provides a publisher (\u003ccode\u003eObjectWillChangePublisher\u003c/code\u003e) that emits before the object changes.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eloadMoreContents()\u003c/code\u003e function allows requesting additional search content asynchronously.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003esearchContentBlocks\u003c/code\u003e property provides access to the ready-to-display search content blocks.\u003c/p\u003e\n"]]],["`SearchContents` class, available on iOS 14+, manages search content blocks. It publishes changes via `ObjectWillChangePublisher`. Key actions include `loadMoreContents()`, which asynchronously retrieves additional content blocks, returning an array of them. `searchContentBlocks` is a published property containing the set of content blocks ready for display. The core functionality revolves around fetching and managing a collection of search results for display.\n"],null,["# SearchInAppsSDK Framework Reference\n\nSearchContents\n==============\n\n @available(iOS, introduced: 14)\n @objc\n final class SearchContents\n\nA collection of search content block data\n- `\n ``\n ``\n `\n\n ### [ObjectWillChangePublisher](#/s:15SearchInAppsSDK0A8ContentsC25ObjectWillChangePublishera)\n\n `\n ` \n The type of publisher that emits before the object has changed. \n\n #### Declaration\n\n Swift \n\n @available(iOS, introduced: 14)\n typealias ObjectWillChangePublisher = ObservableObjectPublisher\n\n- `\n ``\n ``\n `\n\n ### [loadMoreContents()](#/c:@M@SearchInAppsSDK@objc(cs)SearchContents(im)loadMoreContentsWithCompletionHandler:)\n\n `\n ` \n Request additional content (if available) using the same options as the original request. \n\n #### Declaration\n\n Swift \n\n @available(iOS, introduced: 14)\n @objc\n final func loadMoreContents() async throws -\u003e [../Classes/SearchContentBlockData.html]\n\n #### Return Value\n\n An array containing the additional search content.\n- `\n ``\n ``\n `\n\n ### [searchContentBlocks](#/c:@M@SearchInAppsSDK@objc(cs)SearchContents(py)searchContentBlocks)\n\n `\n ` \n The set of search content blocks ready to be displayed \n\n #### Declaration\n\n Swift \n\n @available(iOS, introduced: 14)\n @Published\n @objc\n final var searchContentBlocks: [../Classes/SearchContentBlockData.html] { get }"]]