theme
The theme for rendering a book.
Declaration
var theme: 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 .books.theme schema:
@AppEnum(schema: .books.theme)
enum BookTheme: AppEnum {
case lightMode
case darkMode
case theme1
static var caseDisplayRepresentations: [BookTheme: AppIntents.DisplayRepresentation] = [
.lightMode: "Light Mode",
.darkMode: "Dark Mode",
.theme1: "Theme 1",
]
}For more information about the .books app intent domain, see Making ebook actions available to Siri and Apple Intelligence. For general information about app intent domains, see Integrating actions with Siri and Apple Intelligence.