bookmark
The app entity describes a bookmark.
Declaration
var bookmark: some AssistantSchemas.Entity { get }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:
@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 Making browser actions available to Siri and Apple Intelligence. For general information about app intent domains, see Integrating actions with Siri and Apple Intelligence.