documentKind
The file type for a document.
Declaration
var documentKind: some AssistantSchemas.Enum { get }Mentioned in
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 .reader.documentKind schema:
@AppEnum(schema: .reader.documentKind)
enum ReaderDocumentKind: AppEnum, Codable {
case image
case pdf
static var caseDisplayRepresentations: [Self: DisplayRepresentation] {
[
.image: .init(title: "Image", image: .init(systemName: "photo")),
.pdf: .init(title: "PDF", image: .init(systemName: "doc.text")),
]
}
}For more information about the .reader app intent domain, see Making document reader actions available to Siri and Apple Intelligence. For general information about app intent domains, see Integrating actions with Siri and Apple Intelligence.