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