Assistant schema conformance for app entities that describe spreadsheet data.
Members (3)
get · iOS 16.0+
sheet
Swift declaration
var sheet: some AssistantSchemas.Entity { get }
The app entity describes a sheet in a spreadsheet.
## 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.sheet` schema:
```swift
@AppEntity(schema: .spreadsheet.sheet)
struct SheetEntity: AppEntity {
struct Query: EntityStringQuery {
func entities(for identifiers: [SheetEntity.ID]) async throws -> [SheetEntity] { [] }
func entities(matching string: String) async throws -> [SheetEntity] { [] }
}
static var defaultQuery = Query()
var displayRepresentation: DisplayRepresentation { "Sheet" }
let id = UUID()
@Property
public var spreadsheet: SpreadsheetEntity
@Property
public var name: String
@Property
public var sheetIndex: Int
```
For more information about the `.spreadsheet` app intent domain,
see <doc:app-schema-domain-spreadsheet>.
For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.
get · iOS 16.0+
document
Swift declaration
var document: some AssistantSchemas.Entity { get }
The app entity describes a spreadsheet.
## 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:
```swift
@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 <doc:app-schema-domain-spreadsheet>.
For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.
get · iOS 16.0+
template
Swift declaration
var template: some AssistantSchemas.Entity { get }
The app entity describes a template for a spreadsheet.
## 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:
```swift
@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: String
```
For more information about the `.spreadsheet` app intent domain,
see <doc:app-schema-domain-spreadsheet>.
For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.