document
The app entity describes a presentation.
Declaration
var document: some AssistantSchemas.Entity { get }Mentioned in
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 .presentation.document schema:
@AppEntity(schema: .presentation.document)
struct PresentationEntity: AppEntity {
struct Query: EntityStringQuery {
func entities(for identifiers: [PresentationEntity.ID]) async throws -> [PresentationEntity] { [] }
func entities(matching string: String) async throws -> [PresentationEntity] { [] }
}
static var defaultQuery = Query()
var displayRepresentation: DisplayRepresentation { "Presentation" }
let id = UUID()
@Property
var name: String
}For more information about the .presentation app intent domain, see Making presentation actions available to Siri and Apple Intelligence. For general information about app intent domains, see Integrating actions with Siri and Apple Intelligence.