One Logo Pool Ball
AppIntents · IOS API REFERENCE

AppSchema.CameraIntent

protocol · iOS 18.0+ · SDK 27.1

protocol CameraIntent : AppSchema.Kind

Identifies intent schemas in the camera domain.

Members (5)

get · iOS 18.0+

stopCapture

Swift declaration
var stopCapture: some AppSchemaIntent { get }

An intent schema that stops a recording in progress. 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 `camera` domain and one of your app's actions matches the `stopCapture` schema, you can generate the properties and protocol conformance the schema requires for your intent implementation with the `@AppIntent( .camera.stopCapture)` 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 `stopCapture` schema: ```swift @AppIntent(schema: .camera.stopCapture) struct StopCaptureIntent { func perform() async throws -> some IntentResult { <#code#> } } ``` The schema supports the following system experiences: - 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 18.0+

startCapture

Swift declaration
var startCapture: some AppSchemaIntent { get }

An intent schema that starts a capture or opens the camera in a specified mode with a timer setting. 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 `camera` domain and one of your app's actions matches the `startCapture` schema, you can generate the properties and protocol conformance the schema requires for your intent implementation with the `@AppIntent( .camera.startCapture)` 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 `startCapture` schema: ```swift @AppIntent(schema: .camera.startCapture) struct StartCameraCaptureIntent { var captureMode: <#CaptureMode#> var device: <#CaptureDevice#>? var timerDuration: <#CaptureDuration#>? 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 18.0+

switchDevice

Swift declaration
var switchDevice: some AppSchemaIntent { get }

An intent schema that toggles between front and back camera. 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 `camera` domain and one of your app's actions matches the `switchDevice` schema, you can generate the properties and protocol conformance the schema requires for your intent implementation with the `@AppIntent( .camera.switchDevice)` 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 `switchDevice` schema: ```swift @AppIntent(schema: .camera.switchDevice) struct FlipCameraIntent { 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 18.0+

openInCaptureMode

Swift declaration
var openInCaptureMode: some AppSchemaIntent { get }

An intent schema that opens the camera in the specified mode. 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 `camera` domain and one of your app's actions matches the `openInCaptureMode` schema, you can generate the properties and protocol conformance the schema requires for your intent implementation with the `@AppIntent( .camera.openInCaptureMode)` 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 `openInCaptureMode` schema: ```swift @AppIntent(schema: .camera.openInCaptureMode) struct NavigateToCaptureModeIntent: OpenIntent { var target: <#CaptureMode#> func perform() async throws -> some IntentResult { <#code#> } } ``` The schema supports the following system experiences: - 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 18.0+

setDevice

Swift declaration
var setDevice: some AppSchemaIntent { get }

An intent schema that changes the camera to the specified position. 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 `camera` domain and one of your app's actions matches the `setDevice` schema, you can generate the properties and protocol conformance the schema requires for your intent implementation with the `@AppIntent( .camera.setDevice)` 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 `setDevice` schema: ```swift @AppIntent(schema: .camera.setDevice) struct SetActiveDeviceIntent { var device: <#CaptureDevice#> func perform() async throws -> some IntentResult { <#code#> } } ``` The schema supports the following system experiences: - 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 →