One Logo Pool Ball
AppIntents · IOS API REFERENCE

AssistantSchemas.WordProcessorIntent

protocol · iOS 16.0+ · SDK 27.1

protocol WordProcessorIntent : AssistantSchemas.Model

Assistant schema conformance for app intents that offer word processing functionality.

Members (9)

get · iOS 16.0+

createPage

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

The app intent conforms to the schema for creating a page in 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 `.wordProcessor.createPage` schema: ```swift @AppIntent(schema: .wordProcessor.createPage) struct CreateWordProcessorPageIntent: AppIntent { @Parameter var target: WordProcessorDocumentEntity @Parameter var template: String? func perform() async throws -> some ReturnsValue<WordProcessorPageEntity> { .result(value: WordProcessorPageEntity()) } } ```

get · iOS 16.0+

addAudioToPage

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

The app intent conforms to the schema for adding audio to a page in 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 `.wordProcessor.addAudioToPage` schema: ```swift @AppIntent(schema: .wordProcessor.addAudioToPage) struct AddAudioToWordProcessorPageIntent: AppIntent { @Parameter var target: WordProcessorPageEntity @Parameter(supportedContentTypes: [.audio]) var audio: IntentFile func perform() async throws -> some IntentResult { .result() } } ```

get · iOS 16.0+

addImageToPage

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

The app intent conforms to the schema for adding an image to a page in 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 `.wordProcessor.addImageToPage` schema: ```swift @AppIntent(schema: .wordProcessor.addImageToPage) struct AddImageToWordProcessorPageIntent: AppIntent { @Parameter var target: WordProcessorPageEntity @Parameter(supportedContentTypes: [.image]) var image: IntentFile func perform() async throws -> some IntentResult { .result() } } ```

get · iOS 16.0+

addVideoToPage

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

The app intent conforms to the schema for adding a video to a page in 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 `.wordProcessor.addVideoToPage` schema: ```swift @AppIntent(schema: .wordProcessor.addVideoToPage) struct AddVideoToWordProcessorPageIntent: AppIntent { @Parameter var target: WordProcessorPageEntity @Parameter(supportedContentTypes: [.movie]) var video: IntentFile func perform() async throws -> some IntentResult { .result() } } ```

get · iOS 16.0+

addTextBoxToPage

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

The app intent conforms to the schema for adding a text box to a page in 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 `.wordProcessor.addTextBoxToPage` schema: ```swift @AppIntent(schema: .wordProcessor.addTextBoxToPage) struct AddTextBoxToWordProcessorPageIntent: AppIntent { @Parameter var target: WordProcessorPageEntity @Parameter var text: String func perform() async throws -> some IntentResult { .result() } } ```

get · iOS 16.0+

addWebVideoToPage

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

The app intent conforms to the schema for adding a web video to a page in 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 `.wordProcessor.addWebVideoToPage` schema: ```swift @AppIntent(schema: .wordProcessor.addWebVideoToPage) struct AddWebVideoToWordProcessorPageIntent: AppIntent { @Parameter var target: WordProcessorPageEntity @Parameter(supportedContentTypes: [.audio]) var audio: IntentFile func perform() async throws -> some IntentResult { .result() } } ```

get · iOS 16.0+

open

Swift declaration
var open: 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 `.wordProcessor.open` schema: ```swift @AppIntent(schema: .wordProcessor.open) struct OpenWordProcessorDocumentIntent: OpenIntent { @Parameter var target: WordProcessorDocumentEntity func perform() async throws -> some IntentResult { .result() } } ```

get · iOS 16.0+

create

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

The app intent conforms to the schema for creating 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 `.wordProcessor.create` schema: ```swift @AppIntent(schema: .wordProcessor.create) struct CreateWordProcessorDocumentIntent: AppIntent { @Parameter var template: WordProcessorDocumentTemplateEntity? func perform() async throws -> some ReturnsValue<WordProcessorDocumentEntity> { .result(value: WordProcessorDocumentEntity()) } } ```

get · iOS 16.0+

openPage

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

The app intent conforms to the schema for opening a page in 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 `.wordProcessor.openPage` schema: ```swift @AppIntent(schema: .wordProcessor.openPage) struct OpenWordProcessorPageIntent: OpenIntent { @Parameter var target: WordProcessorPageEntity func perform() async throws -> some IntentResult { .result() } } ```

Skipped declarations

No declarations were skipped in this snapshot.

All AppIntents types →