One Logo Pool Ball
AppIntents · IOS API REFERENCE

AssistantSchemas.BrowserEntity

protocol · iOS 16.0+ · SDK 27.1

protocol BrowserEntity : AssistantSchemas.Model

Assistant schema conformance for app entities that describe data for web browsing functionality.

Members (3)

get · iOS 16.0+

tab

Swift declaration
var tab: some AssistantSchemas.Entity { get }

The app entity describes a browser tab. ## Overview Use Swift macros that generate additional properties and add protocol conformance for your app entity implementation. The following example shows an app entity that conforms to the `.browser.tab` schema: ```swift @AppEntity(schema: .browser.tab) struct TabEntity: AppEntity { static var defaultQuery = Query() let id = UUID() @Property var url: URL? @Property var name: String @Property var isPrivate: Bool var displayRepresentation: AppIntents.DisplayRepresentation { "Tab" } struct Query: EntityStringQuery { func entities(for identifiers: [TabEntity.ID]) async throws -> [TabEntity] { [] } func entities(matching string: String) async throws -> [TabEntity] { [] } } } ``` For more information about the `.browser` app intent domain, see <doc:app-schema-domain-browser>. For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.

get · iOS 16.0+

window

Swift declaration
var window: some AssistantSchemas.Entity { get }

The app entity describes a browser window. ## Overview Use Swift macros that generate additional properties and add protocol conformance for your app entity implementation. The following example shows an app entity that conforms to the `.browser.window` schema: ```swift @AppEntity(schema: .browser.window) struct WindowEntity: AppEntity { static var defaultQuery = Query() let id = UUID() @Property var tabs: [TabEntity] @Property var isPrivate: Bool var displayRepresentation: AppIntents.DisplayRepresentation { "Window" } struct Query: EntityStringQuery { func entities(for identifiers: [WindowEntity.ID]) async throws -> [WindowEntity] { [] } func entities(matching string: String) async throws -> [WindowEntity] { [] } } } ``` For more information about the `.browser` app intent domain, see <doc:app-schema-domain-browser>. For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.

get · iOS 16.0+

bookmark

Swift declaration
var bookmark: some AssistantSchemas.Entity { get }

The app entity describes a bookmark. ## Overview Use Swift macros that generate additional properties and add protocol conformance for your app entity implementation. The following example shows an app entity that conforms to the `.browser.bookmark` schema: ```swift @AppEntity(schema: .browser.bookmark) struct BookmarkEntity: AppEntity { static var defaultQuery = Query() let id = UUID() @Property var name: String @Property var url: URL var displayRepresentation: AppIntents.DisplayRepresentation { "Bookmark" } struct Query: EntityStringQuery { func entities(for identifiers: [BookmarkEntity.ID]) async throws -> [BookmarkEntity] { [] } func entities(matching string: String) async throws -> [BookmarkEntity] { [] } } } ``` For more information about the `.browser` app intent domain, see <doc:app-schema-domain-browser>. For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.

Skipped declarations

No declarations were skipped in this snapshot.

All AppIntents types →