One Logo Pool Ball
AppIntents · IOS API REFERENCE

AssistantSchemas.WhiteboardEntity

protocol · iOS 16.0+ · SDK 27.1

protocol WhiteboardEntity : AssistantSchemas.Model

Assistant schema conformance for app entities that describe data for whiteboard functionality.

Members (2)

get · iOS 16.0+

item

Swift declaration
var item: some AssistantSchemas.Entity { get }

The app entity describes an item on a whiteboard canvas. ## 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 `.whiteboard.item` schema: ```swift @AppEntity(schema: .whiteboard.item) struct CanvasItemEntity: AppEntity { struct Query: EntityStringQuery { func entities(for identifiers: [CanvasItemEntity.ID]) async throws -> [CanvasItemEntity] { [] } func entities(matching string: String) async throws -> [CanvasItemEntity] { [] } } static var defaultQuery = Query() var displayRepresentation: DisplayRepresentation { "Canvas Item" } let id = UUID() @Property var type: CanvasItemType @Property var label: String? @Property var x: Double @Property var y: Double @Property var width: Double? @Property var height: Double? } ``` 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+

board

Swift declaration
var board: some AssistantSchemas.Entity { get }

The app entity describes a whiteboard canvas. ## 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 `.whiteboard.board` schema: ```swift @AppEntity(schema: .whiteboard.board) struct CanvasEntity: AppEntity { struct Query: EntityStringQuery { func entities(for identifiers: [CanvasEntity.ID]) async throws -> [CanvasEntity] { [] } func entities(matching string: String) async throws -> [CanvasEntity] { [] } } static var defaultQuery = Query() var displayRepresentation: DisplayRepresentation { "Canvas" } let id = UUID() @Property var title: String @Property var creationDate: Date @Property var lastModificationDate: Date } ``` 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>.

Skipped declarations

No declarations were skipped in this snapshot.

All AppIntents types →