One Logo Pool Ball
AppIntents · IOS API REFERENCE

AssistantSchemas.BooksIntent

protocol · iOS 16.0+ · SDK 27.1

protocol BooksIntent : AssistantSchemas.Model

Assistant schema conformance for app intents that offer ebook and audiobook functionality.

Members (9)

get · iOS 16.0+

navigatePage

Swift declaration
var navigatePage: some AssistantSchemas.Intent { get }

The app intent conforms to the schema for navigating to a specific page of an ebook. ## Overview Use Swift macros that generate additional properties and add protocol conformance for your app intent implementation. The following example shows an app intent that conforms to the `.books.navigatePage` schema: ```swift @AppIntent(schema: .books.navigatePage) struct NavigateBookPageIntent: AppIntent { @Parameter var target: BookEntity @Parameter var direction: BookNavigationDirection func perform() async throws -> some IntentResult { .result() } } ``` For more information about the `.books` app intent domain, see <doc:app-schema-domain-books>. For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.

get · iOS 16.0+

playAudiobook

Swift declaration
var playAudiobook: some AssistantSchemas.Intent { get }

The app intent conforms to the schema for playing an audiobook. ## Overview Use Swift macros that generate additional properties and add protocol conformance for your app intent implementation. The following example shows an app intent that conforms to the `.books.playAudiobook` schema: ```swift @AppIntent(schema: .books.playAudiobook) struct PlayAudiobookIntent: AudioPlaybackIntent { @Parameter var target: AudiobookEntity func perform() async throws -> some IntentResult { .result() } } ``` For more information about the `.books` app intent domain, see <doc:app-schema-domain-books>. For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.

get · iOS 16.0+

updateFontSize

Swift declaration
var updateFontSize: some AssistantSchemas.Intent { get }

The app intent conforms to the schema for updating the font size. ## Overview Use Swift macros that generate additional properties and add protocol conformance for your app intent implementation. The following example shows an app intent that conforms to the `.books.updateFontSize` schema: ```swift @AppIntent(schema: .books.updateFontSize) struct UpdateBookFontSizeIntent: AppIntent { @Parameter var target: BookSettingsEntity @Parameter var changeOperation: BookRelativeFontChange func perform() async throws -> some IntentResult { .result() } } ``` For more information about the `.books` app intent domain, see <doc:app-schema-domain-books>. For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.

get · iOS 16.0+

updateSettings

Swift declaration
var updateSettings: some AssistantSchemas.Intent { get }

The app intent conforms to the schema for updating settings for an ebook. ## Overview Use Swift macros that generate additional properties and add protocol conformance for your app intent implementation. The following example shows an app intent that conforms to the `.books.updateSettings` schema: ```swift @AppIntent(schema: .books.updateSettings) struct UpdateBookSettingsIntent: AppIntent { @Parameter var target: BookSettingsEntity @Parameter var page: Int? @Parameter var font: BookFont? @Parameter var theme: BookTheme? @Parameter var pageNavigationSetting: BookPageNavigationSetting? @Parameter var isTextJustified: Bool? @Parameter var isAllowMultipleColumns: Bool? func perform() async throws -> some IntentResult { .result() } } ``` For more information about the `.books` app intent domain, see <doc:app-schema-domain-books>. For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.

get · iOS 16.0+

updateLineSpacing

Swift declaration
var updateLineSpacing: some AssistantSchemas.Intent { get }

The app intent conforms to the schema for updating the line spacing. ## Overview Use Swift macros that generate additional properties and add protocol conformance for your app intent implementation. The following example shows an app intent that conforms to the `.books.updateLineSpacing` schema: ```swift @AppIntent(schema: .books.updateLineSpacing) struct UpdateBookLineSpacingIntent: AppIntent { @Parameter var target: BookSettingsEntity @Parameter var changeOperation: BookRelativeLineSpacingChange func perform() async throws -> some IntentResult { .result() } } For more information about the `.books` app intent domain, see <doc:app-schema-domain-books>. For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>. ```

get · iOS 16.0+

updateWordSpacing

Swift declaration
var updateWordSpacing: some AssistantSchemas.Intent { get }

The app intent conforms to the schema for updating the spacing between words. ## Overview Use Swift macros that generate additional properties and add protocol conformance for your app intent implementation. The following example shows an app intent that conforms to the `.books.updateWordSpacing` schema: ```swift @AppIntent(schema: .books.updateWordSpacing) struct UpdateWordSpacingIntent: AppIntent { @Parameter var target: BookSettingsEntity @Parameter var changeOperation: BookRelativeWordSpacingChange func perform() async throws -> some IntentResult { .result() } } ``` For more information about the `.books` app intent domain, see <doc:app-schema-domain-books>. For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.

get · iOS 16.0+

updateCharacterSpacing

Swift declaration
var updateCharacterSpacing: some AssistantSchemas.Intent { get }

The app intent conforms to the schema for updating the character spacing. ## Overview Use Swift macros that generate additional properties and add protocol conformance for your app intent implementation. The following example shows an app intent that conforms to the `.books.updateCharacterSpacing` schema: ```swift @AppIntent(schema: .books.updateCharacterSpacing) struct UpdateCharacterSpacingIntent: AppIntent { @Parameter var target: BookSettingsEntity @Parameter var changeOperation: BookRelativeCharacterSpacingChange func perform() async throws -> some IntentResult { .result() } } ``` For more information about the `.books` app intent domain, see <doc:app-schema-domain-books>. For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.

get · iOS 16.0+

search

Swift declaration
var search: some AssistantSchemas.Intent { get }

The app intent conforms to the schema for searching an ebook or audiobook library. ## Overview Use Swift macros that generate additional properties and add protocol conformance for your app intent implementation. The following example shows an app intent that conforms to the `.books.search` schema: ```swift @AppIntent(schema: .books.search) struct SearchLibraryIntent: ShowInAppSearchResultsIntent { @Parameter var criteria: StringSearchCriteria func perform() async throws -> some IntentResult { .result() } } ``` For more information about the `.books` app intent domain, see <doc:app-schema-domain-books>. For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.

get · iOS 16.0+

openBook

Swift declaration
var openBook: some AssistantSchemas.Intent { get }

The app intent conforms to the schema for opening an ebook. ## Overview Use Swift macros that generate additional properties and add protocol conformance for your app intent implementation. The following example shows an app intent that conforms to the `.books.openBook` schema: ```swift @AppIntent(schema: .books.openBook) struct OpenBookIntent: OpenIntent { @Parameter var target: BookEntity func perform() async throws -> some IntentResult { .result() } } ``` For more information about the `.books` app intent domain, see <doc:app-schema-domain-books>. 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 →