One Logo Pool Ball
AppIntents · IOS API REFERENCE

AppSchema.MessagesIntent

protocol · iOS 27.0+ · SDK 27.1

protocol MessagesIntent : AppSchema.Kind

Identifies intent schemas in the messages domain.

Members (5)

get · iOS 27.0+

sendMessage

Swift declaration
var sendMessage: some AppSchemaIntent { get }

An intent schema that sends a message with the associated parameters. To make your app's actions available to Apple Intelligence, conform your ``AppIntent`` to a schema that describes your action to the system. If your app's functionality aligns with the `messages` domain and one of your app's actions matches the `sendMessage` schema, you can generate the properties and protocol conformance the schema requires for your intent implementation with the `@AppIntent( .messages.sendMessage)` Swift macro. To make your app work with Siri, see <doc://com.apple.documentation/documentation/appintents/apple-intelligence-and-siri-ai>. The following example shows an intent that conforms to the `sendMessage` schema: ```swift @AppIntent(schema: .messages.sendMessage) struct SendMessageIntent { var content: AttributedString? var destination: <#MessageDestination#> var subject: AttributedString? var attachments: [IntentFile] var audioMessage: IntentFile? var locations: [GeoToolbox.PlaceDescriptor] var links: [URL] var scheduledDate: Date? func perform() async throws -> some ReturnsValue<[<#MessageEntity#>]> { <#code#> } } ``` The schema supports the following system experiences: - Siri - Shortcuts For more information about the App Intents framework and the experiences it supports, see <doc://com.apple.documentation/documentation/appintents/getting-started-with-the-app-intents-framework>.

get · iOS 27.0+

draftMessage

Swift declaration
var draftMessage: some AppSchemaIntent { get }

An intent schema that opens app to start or continue composing a message via touch. To make your app's actions available to Apple Intelligence, conform your ``AppIntent`` to a schema that describes your action to the system. If your app's functionality aligns with the `messages` domain and one of your app's actions matches the `draftMessage` schema, you can generate the properties and protocol conformance the schema requires for your intent implementation with the `@AppIntent( .messages.draftMessage)` Swift macro. To make your app work with Siri, see <doc://com.apple.documentation/documentation/appintents/apple-intelligence-and-siri-ai>. The following example shows an intent that conforms to the `draftMessage` schema: ```swift @AppIntent(schema: .messages.draftMessage) struct DraftMessageIntent { var destination: <#MessageDestination#>? var subject: AttributedString? var content: AttributedString? var attachments: [IntentFile] var audioMessage: IntentFile? var locations: [GeoToolbox.PlaceDescriptor] var links: [URL] var scheduledDate: Date? func perform() async throws -> some IntentResult { <#code#> } } ``` The schema supports the following system experiences: - Siri - Shortcuts For more information about the App Intents framework and the experiences it supports, see <doc://com.apple.documentation/documentation/appintents/getting-started-with-the-app-intents-framework>.

get · iOS 27.0+

unsendMessage

Swift declaration
var unsendMessage: some AppSchemaIntent { get }

An intent schema that unsends a sent message. To make your app's actions available to Apple Intelligence, conform your ``AppIntent`` to a schema that describes your action to the system. If your app's functionality aligns with the `messages` domain and one of your app's actions matches the `unsendMessage` schema, you can generate the properties and protocol conformance the schema requires for your intent implementation with the `@AppIntent( .messages.unsendMessage)` Swift macro. To make your app work with Siri, see <doc://com.apple.documentation/documentation/appintents/apple-intelligence-and-siri-ai>. The following example shows an intent that conforms to the `unsendMessage` schema: ```swift @AppIntent(schema: .messages.unsendMessage) struct UnsendMessageIntent { var message: <#MessageEntity#> func perform() async throws -> some IntentResult { <#code#> } } ``` The schema supports the following system experiences: - Siri - Shortcuts For more information about the App Intents framework and the experiences it supports, see <doc://com.apple.documentation/documentation/appintents/getting-started-with-the-app-intents-framework>.

get · iOS 27.0+

editSentMessage

Swift declaration
var editSentMessage: some AppSchemaIntent { get }

An intent schema that edits an already sent message with new content. To make your app's actions available to Apple Intelligence, conform your ``AppIntent`` to a schema that describes your action to the system. If your app's functionality aligns with the `messages` domain and one of your app's actions matches the `editSentMessage` schema, you can generate the properties and protocol conformance the schema requires for your intent implementation with the `@AppIntent( .messages.editSentMessage)` Swift macro. To make your app work with Siri, see <doc://com.apple.documentation/documentation/appintents/apple-intelligence-and-siri-ai>. The following example shows an intent that conforms to the `editSentMessage` schema: ```swift @AppIntent(schema: .messages.editSentMessage) struct EditSentMessageIntent { var message: <#MessageEntity#> var content: AttributedString func perform() async throws -> some IntentResult { <#code#> } } ``` The schema supports the following system experiences: - Siri - Shortcuts For more information about the App Intents framework and the experiences it supports, see <doc://com.apple.documentation/documentation/appintents/getting-started-with-the-app-intents-framework>.

get · iOS 27.0+

setMessageReadStatus

Swift declaration
var setMessageReadStatus: some AppSchemaIntent { get }

An intent schema that changes the message read status to a given value. To make your app's actions available to Apple Intelligence, conform your ``AppIntent`` to a schema that describes your action to the system. If your app's functionality aligns with the `messages` domain and one of your app's actions matches the `setMessageReadStatus` schema, you can generate the properties and protocol conformance the schema requires for your intent implementation with the `@AppIntent( .messages.setMessageReadStatus)` Swift macro. To make your app work with Siri, see <doc://com.apple.documentation/documentation/appintents/apple-intelligence-and-siri-ai>. The following example shows an intent that conforms to the `setMessageReadStatus` schema: ```swift @AppIntent(schema: .messages.setMessageReadStatus) struct SetMessageReadStatusIntent { var message: <#MessageEntity#> var isRead: Bool func perform() async throws -> some IntentResult { <#code#> } } ``` The schema supports the following system experiences: - Siri - Shortcuts For more information about the App Intents framework and the experiences it supports, see <doc://com.apple.documentation/documentation/appintents/getting-started-with-the-app-intents-framework>.

Skipped declarations

No declarations were skipped in this snapshot.

All AppIntents types →