documentKind
The file type for a document.
Declaration
var documentKind: some AssistantSchemas.Enum { get }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 doc:Making-document-reader-actions-available-to-siri-and-apple-intelligence. For general information about app intent domains, see doc:Integrating-actions-with-siri-and-apple-intelligence.