Contents

board

The app entity describes a whiteboard canvas.

Declaration

var board: 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 .whiteboard.board schema:

@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 Making whiteboard actions available to Siri and Apple Intelligence. For general information about app intent domains, see Integrating actions with Siri and Apple Intelligence.

See Also

Content and parameter types