Assistant schema conformance for whiteboard types.
Members (2)
get · iOS 16.0+
color
Swift declaration
var color: some AssistantSchemas.Enum { get }
The color of a whiteboard canvas.
## Overview
Use Swift macros that generate additional properties and add protocol conformance
for your app enum implementation. The following example shows an app enum that conforms to the `.whiteboard.color` schema:
```swift
@AppEnum(schema: .whiteboard.color)
enum CanvasColor: AppEnum {
case red
case blue
static var caseDisplayRepresentations: [CanvasColor: AppIntents.DisplayRepresentation] = [
.red: "Red",
.blue: "Blue",
]
}
```
For more information about the `.whiteboard` app intent domain,
see <doc:app-schema-domain-whiteboard>.
For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.
get · iOS 16.0+
itemType
Swift declaration
var itemType: some AssistantSchemas.Enum { get }
The type of an item on a whiteboard canvas.
## Overview
Use Swift macros that generate additional properties and add protocol conformance
for your app enum implementation. The following example shows an app enum that conforms to the `.whiteboard.itemType` schema:
```swift
@AppEnum(schema: .whiteboard.itemType)
enum CanvasItemType: AppEnum {
case square
case circle
static var caseDisplayRepresentations: [CanvasItemType: AppIntents.DisplayRepresentation] = [
.square: "Square",
.circle: "Circle",
]
}
```
For more information about the `.whiteboard` app intent domain,
see <doc:app-schema-domain-whiteboard>.
For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.