template
The app entity describes a template for a presentation.
Declaration
var template: 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 .presentation.template schema:
@AppEntity(schema: .presentation.template)
struct PresentationTemplateEntity: AppEntity {
struct Query: EntityStringQuery {
func entities(for identifiers: [PresentationTemplateEntity.ID]) async throws -> [PresentationTemplateEntity] { [] }
func entities(matching string: String) async throws -> [PresentationTemplateEntity] { [] }
}
static var defaultQuery = Query()
var displayRepresentation: DisplayRepresentation { "Presentation Template" }
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.