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