document
The app entity describes a spreadsheet.
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 .spreadsheet.document schema:
@AppEntity(schema: .spreadsheet.document)
struct SpreadsheetEntity: AppEntity {
struct Query: EntityStringQuery {
func entities(for identifiers: [SpreadsheetEntity.ID]) async throws -> [SpreadsheetEntity] { [] }
func entities(matching string: String) async throws -> [SpreadsheetEntity] { [] }
}
static var defaultQuery = Query()
var displayRepresentation: DisplayRepresentation { "Spreadsheet" }
let id = UUID()
@Property
var name: String
For 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.