One Logo Pool Ball
AppIntents · IOS API REFERENCE

AssistantSchemas.ReaderIntent

protocol · iOS 16.0+ · SDK 27.1

protocol ReaderIntent : AssistantSchemas.Model

Assistant schema conformance for app intents that offer document viewing and editing functionality.

Members (9)

get · iOS 16.0+

deletePages

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

The app intent conforms to the schema for deleting a page. ## 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 `.reader.deletePages` schema: ```swift @AppIntent(schema: .reader.deletePages) struct ReaderDeletePagesIntent: DeleteIntent { @Parameter var entities: [ReaderPageEntity] func perform() async throws -> some IntentResult { return .result() } } ``` For more information about the `.reader` app intent domain, see <doc:app-schema-domain-reader>. For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.

get · iOS 16.0+

insertPages

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

The app intent conforms to the schema for inserting a page. ## 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 `.reader.insertPages` schema: ```swift @AppIntent(schema: .reader.insertPages) struct ReaderInsertPagesIntent: AppIntent { @Parameter var files: [IntentFile] @Parameter var isAfter: Bool @Parameter var page: ReaderPageEntity func perform() async throws -> some IntentResult { return .result() } } ``` For more information about the `.reader` app intent domain, see <doc:app-schema-domain-reader>. For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.

get · iOS 16.0+

rotatePages

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

The app intent conforms to the schema for rotating a page. ## 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 `.reader.rotatePages` schema: ```swift @AppIntent(schema: .reader.rotatePages) struct ReaderRotatePagesIntent: AppIntent { @Parameter var pages: [ReaderPageEntity] @Parameter var isClockwise: Bool func perform() async throws -> some IntentResult & ReturnsValue<[ReaderPageEntity]> { return .result(value: [ReaderPageEntity()]) } } ``` For more information about the `.reader` app intent domain, see <doc:app-schema-domain-reader>. For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.

get · iOS 16.0+

openDocument

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

The app intent conforms to the schema for opening a text document. ## 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 `.reader.openDocument` schema: ```swift @AppIntent(schema: .reader.openDocument) struct ReaderOpenDocumentsIntent: AppIntent { @Parameter var files: [IntentFile] func perform() async throws -> some IntentResult { return .result() } } ``` For more information about the `.reader` app intent domain, see <doc:app-schema-domain-reader>. For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.

get · iOS 16.0+

resizeDocuments

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

The app intent conforms to the schema for resizing a document. ## 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 `.reader.resizeDocuments` schema: ```swift @AppIntent(schema: .reader.resizeDocuments) struct ReaderResizeDocumentsIntent: AppIntent { @Parameter var documents: [ReaderDocumentEntity] @Parameter var width: Double? @Parameter var height: Double? func perform() async throws -> some IntentResult & ReturnsValue<[ReaderDocumentEntity]> { return .result(value: [ReaderDocumentEntity()]) } } ``` For more information about the `.reader` app intent domain, see <doc:app-schema-domain-reader>. For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.

get · iOS 16.0+

rotateDocuments

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

The app intent conforms to the schema for rotating a document. ## 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 `.reader.rotateDocuments` schema: ```swift @AppIntent(schema: .reader.rotateDocuments) struct ReaderRotateDocumentsIntent: AppIntent { @Parameter var documents: [ReaderDocumentEntity] @Parameter var isClockwise: Bool func perform() async throws -> some IntentResult & ReturnsValue<[ReaderDocumentEntity]> { return .result(value: [ReaderDocumentEntity()]) } } ``` For more information about the `.reader` app intent domain, see <doc:app-schema-domain-reader>. For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.

get · iOS 16.0+

searchDocuments

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

The app intent conforms to the schema for searching in a document. ## 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 `.reader.searchDocuments` schema: ```swift @AppIntent(schema: .reader.searchDocuments) struct SearchReaderDocumentsIntent: AppIntent { @Parameter var documents: [ReaderDocumentEntity] @Parameter var criteria: String func perform() async throws -> some IntentResult { return .result() } } ``` For more information about the `.reader` app intent domain, see <doc:app-schema-domain-reader>. For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.

get · iOS 16.0+

enhanceDocuments

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

The app intent conforms to the schema for enhancing a document. ## 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 `.reader.enhanceDocuments` schema: ```swift @AppIntent(schema: .reader.enhanceDocuments) struct ReaderEnhanceDocumentsIntent: AppIntent { @Parameter var target: [ReaderDocumentEntity] func perform() async throws -> some IntentResult & ReturnsValue<[ReaderDocumentEntity]> { return .result(value: [ReaderDocumentEntity()]) } } ``` For more information about the `.reader` app intent domain, see <doc:app-schema-domain-reader>. For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.

get · iOS 16.0+

openPage

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

The app intent conforms to the schema for opening a document. ## 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 `.reader.openPage` schema: ```swift @AppIntent(schema: .reader.openPage) struct ReaderOpenPageIntent: OpenIntent { @Parameter var target: ReaderPageEntity func perform() async throws -> some IntentResult & ReturnsValue<ReaderPageEntity> { return .result(value: ReaderPageEntity()) } } ``` For more information about the `.reader` app intent domain, see <doc:app-schema-domain-reader>. 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 →