One Logo Pool Ball
AppIntents · IOS API REFERENCE

AppSchema.AudioIntent

protocol · iOS 27.0+ · SDK 27.1

protocol AudioIntent : AppSchema.Kind

Identifies intent schemas in the audio domain.

Members (7)

get · iOS 27.0+

playAudio

Swift declaration
var playAudio: some AppSchemaIntent { get }

An intent schema that plays an audio item. 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 `audio` domain and one of your app's actions matches the `playAudio` schema, you can generate the properties and protocol conformance the schema requires for your intent implementation with the `@AppIntent( .audio.playAudio)` 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 `playAudio` schema: ```swift @AppIntent(schema: .audio.playAudio) struct PlayAudioIntent: AudioStartingIntent { var audioEntity: <#AudioItem#> var playbackAttributes: Set<<#PlaybackAttributes#>> var warmupAudioQueueResult: <#WarmupAudioQueueResult#>? var queueLocation: <#QueueInsertionLocation#>? 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+

updateAudioAffinity

Swift declaration
var updateAudioAffinity: some AppSchemaIntent { get }

An intent schema that sets the like state of an audio item to liked, unliked, or unset. 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 `audio` domain and one of your app's actions matches the `updateAudioAffinity` schema, you can generate the properties and protocol conformance the schema requires for your intent implementation with the `@AppIntent( .audio.updateAudioAffinity)` 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 `updateAudioAffinity` schema: ```swift @AppIntent(schema: .audio.updateAudioAffinity) struct UpdateAudioAffinityIntent { var affinityState: <#AffinityState#> var target: <#AudioItem#> 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+

warmupAudioQueue

Swift declaration
var warmupAudioQueue: some AppSchemaIntent { get }

An intent schema that warms up an audio item by setting the queue without starting playback. 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 `audio` domain and one of your app's actions matches the `warmupAudioQueue` schema, you can generate the properties and protocol conformance the schema requires for your intent implementation with the `@AppIntent( .audio.warmupAudioQueue)` 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 `warmupAudioQueue` schema: ```swift @AppIntent(schema: .audio.warmupAudioQueue) struct WarmupAudioQueueIntent { var audioEntity: <#AudioItem#> var playbackAttributes: Set<<#PlaybackAttributes#>> func perform() async throws -> some ReturnsValue<<#WarmupAudioQueueResult#>> { <#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+

recognizeAudio

Swift declaration
var recognizeAudio: some AppSchemaIntent { get }

An intent schema that finds out what audio is playing nearby. 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 `audio` domain and one of your app's actions matches the `recognizeAudio` schema, you can generate the properties and protocol conformance the schema requires for your intent implementation with the `@AppIntent( .audio.recognizeAudio)` 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 `recognizeAudio` schema: ```swift @AppIntent(schema: .audio.recognizeAudio) struct RecognizeAudioIntent: AudioRecordingIntent { func perform() async throws -> some ReturnsValue<[<#AudioItem#>]> { <#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+

addToLibrary

Swift declaration
var addToLibrary: some AppSchemaIntent { get }

An intent schema that adds an audio item to the person’s library. 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 `audio` domain and one of your app's actions matches the `addToLibrary` schema, you can generate the properties and protocol conformance the schema requires for your intent implementation with the `@AppIntent( .audio.addToLibrary)` 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 `addToLibrary` schema: ```swift @AppIntent(schema: .audio.addToLibrary) struct AddAudioToLibraryIntent { var audioEntity: <#AudioItem#> 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+

addToPlaylist

Swift declaration
var addToPlaylist: some AppSchemaIntent { get }

An intent schema that adds an audio item to a playlist. 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 `audio` domain and one of your app's actions matches the `addToPlaylist` schema, you can generate the properties and protocol conformance the schema requires for your intent implementation with the `@AppIntent( .audio.addToPlaylist)` 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 `addToPlaylist` schema: ```swift @AppIntent(schema: .audio.addToPlaylist) struct AddAudioToPlaylistIntent { var audioEntity: <#AudioItem#> var playlist: <#PlaylistEntity#> 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+

createStation

Swift declaration
var createStation: some AppSchemaIntent { get }

An intent schema that starts a station based on the now-playing item. 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 `audio` domain and one of your app's actions matches the `createStation` schema, you can generate the properties and protocol conformance the schema requires for your intent implementation with the `@AppIntent( .audio.createStation)` 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 `createStation` schema: ```swift @AppIntent(schema: .audio.createStation) struct CreateStationIntent { 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 →