Assistant schema conformance for app intents that offer photo and video functionality.
Members (27)
get · iOS 16.0+
pasteEdits
Swift declaration
var pasteEdits: some AssistantSchemas.Intent { get }
The app intent conforms to the schema for pasting edits to an asset.
## 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 `.photos.pasteEdits` schema:
```swift
@AppIntent(schema: .photos.pasteEdits)
struct PasteMediaEditsIntent: AppIntent {
@Parameter
var target: [PhotoEntity]
func perform() async throws -> some IntentResult {
.result()
}
}
```
For more information about the `.photos` app intent domain,
see <doc:app-schema-domain-photos>.
For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.
get · iOS 16.0+
straighten
Swift declaration
var straighten: some AssistantSchemas.Intent { get }
The app intent conforms to the schema for straightening an asset.
## 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 `.photos.straighten` schema:
```swift
@AppIntent(schema: .photos.straighten)
struct StraightenMediaIntent: AppIntent {
@Parameter
var target: PhotoEntity
func perform() async throws -> some IntentResult {
.result()
}
}
```
For more information about the `.photos` app intent domain,
see <doc:app-schema-domain-photos>.
For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.
get · iOS 16.0+
createAlbum
Swift declaration
var createAlbum: some AssistantSchemas.Intent { get }
The app intent conforms to the schema for creating an album.
## 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 `.photos.createAlbum` schema:
```swift
@AppIntent(schema: .photos.createAlbum)
struct CreateMediaAlbumIntent: AppIntent {
@Parameter
var name: String
func perform() async throws -> some ReturnsValue<PhotoAlbumEntity> {
.result(value: PhotoAlbumEntity())
}
}
```
For more information about the `.photos` app intent domain,
see <doc:app-schema-domain-photos>.
For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.
get · iOS 16.0+
deleteAlbum
Swift declaration
var deleteAlbum: some AssistantSchemas.Intent { get }
The app intent conforms to the schema for deleting an album.
## 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 `.photos.deleteAlbum` schema:
```swift
@AppIntent(schema: .photos.deleteAlbum)
struct DeleteMediaAlbumIntent: DeleteIntent {
@Parameter
var entities: [PhotoAlbumEntity]
func perform() async throws -> some IntentResult {
.result()
}
}
```
For more information about the `.photos` app intent domain,
see <doc:app-schema-domain-photos>.
For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.
get · iOS 16.0+
setExposure
Swift declaration
var setExposure: some AssistantSchemas.Intent { get }
The app intent conforms to the schema for setting the exposure of an asset.
## 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 `.photos.setExposure` schema:
```swift
@AppIntent(schema: .photos.setExposure)
struct SetMediaExposureIntent: AppIntent {
@Parameter
var target: PhotoEntity
@Parameter
var value: Double?
func perform() async throws -> some IntentResult {
.result()
}
}
```
For more information about the `.photos` app intent domain,
see <doc:app-schema-domain-photos>.
For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.
get · iOS 16.0+
setRotation
Swift declaration
var setRotation: some AssistantSchemas.Intent { get }
The app intent conforms to the schema for rotating an asset.
## 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 `.photos.setRotation` schema:
```swift
@AppIntent(schema: .photos.setRotation)
struct RotateMediaIntent: AppIntent {
@Parameter
var target: PhotoEntity
@Parameter
var direction: PhotoRotationDirection
func perform() async throws -> some IntentResult {
.result()
}
}
```
For more information about the `.photos` app intent domain,
see <doc:app-schema-domain-photos>.
For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.
get · iOS 16.0+
toggleDepth
Swift declaration
var toggleDepth: some AssistantSchemas.Intent { get }
The app intent conforms to the schema for toggling the depth of an asset.
## 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 `.photos.toggleDepth` schema:
```swift
@AppIntent(schema: .photos.toggleDepth)
struct ToggleMediaDepthIntent: AppIntent {
@Parameter
var target: PhotoEntity
@Parameter
var isEnabled: Bool
func perform() async throws -> some IntentResult {
.result()
}
}
```
For more information about the `.photos` app intent domain,
see <doc:app-schema-domain-photos>.
For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.
get · iOS 16.0+
updateAlbum
Swift declaration
var updateAlbum: some AssistantSchemas.Intent { get }
The app intent conforms to the schema for updating an album.
## 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 `.photos.updateAlbum` schema:
```swift
@AppIntent(schema: .photos.updateAlbum)
struct UpdateMediaAlbumIntent: AppIntent {
@Parameter
var target: PhotoAlbumEntity
@Parameter
var name: String
func perform() async throws -> some IntentResult {
.result()
}
}
```
For more information about the `.photos` app intent domain,
see <doc:app-schema-domain-photos>.
For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.
get · iOS 16.0+
updateAsset
Swift declaration
var updateAsset: some AssistantSchemas.Intent { get }
The app intent conforms to the schema for updating an asset.
## 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 `.photos.updateAsset` schema:
```swift
@AppIntent(schema: .photos.updateAsset)
struct UpdateMediaAssetIntent: AppIntent {
@Parameter
var target: [PhotoEntity]
@Parameter
var name: String?
@Parameter
var isHidden: Bool?
@Parameter
var isFavorite: Bool?
func perform() async throws -> some IntentResult {
.result()
}
}
```
For more information about the `.photos` app intent domain,
see <doc:app-schema-domain-photos>.
For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.
get · iOS 16.0+
cleanupPhoto
Swift declaration
var cleanupPhoto: some AssistantSchemas.Intent { get }
The app intent conforms to the schema for undoing edits to an asset.
## 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 `.photos.cleanupPhoto` schema:
```swift
@AppIntent(schema: .photos.cleanupPhoto)
struct CleanupMediaIntent: AppIntent {
@Parameter
var target: PhotoEntity
func perform() async throws -> some IntentResult {
.result()
}
}
```
For more information about the `.photos` app intent domain,
see <doc:app-schema-domain-photos>.
For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.
get · iOS 16.0+
createAssets
Swift declaration
var createAssets: some AssistantSchemas.Intent { get }
The app intent conforms to the schema for creating an asset.
## 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 `.photos.createAssets` schema:
```swift
@AppIntent(schema: .photos.createAssets)
struct CreateMediaAssetsIntent: AppIntent {
@Parameter
var files: [IntentFile]
// Return a set of assets once created.
func perform() async throws -> some ReturnsValue<[PhotoEntity]> {
.result(value: [PhotoEntity()])
}
}
```
For more information about the `.photos` app intent domain,
see <doc:app-schema-domain-photos>.
For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.
get · iOS 16.0+
deleteAssets
Swift declaration
var deleteAssets: some AssistantSchemas.Intent { get }
The app intent conforms to the schema for deleting an asset.
## 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 `.photos.deleteAssets` schema:
```swift
@AppIntent(schema: .photos.deleteAssets)
struct DeleteMediaAssetsIntent: AppIntent {
@Parameter
var entities: [PhotoEntity]
func perform() async throws -> some IntentResult {
.result()
}
}
```
For more information about the `.photos` app intent domain,
see <doc:app-schema-domain-photos>.
For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.
get · iOS 16.0+
setSaturation
Swift declaration
var setSaturation: some AssistantSchemas.Intent { get }
The app intent conforms to the schema for setting the saturation of an asset.
## 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 `.photos.setSaturation` schema:
```swift
@AppIntent(schema: .photos.setSaturation)
struct SetMediaSaturationIntent: AppIntent {
@Parameter
var target: PhotoEntity
@Parameter
var value: Double?
func perform() async throws -> some IntentResult {
.result()
}
}
```
For more information about the `.photos` app intent domain,
see <doc:app-schema-domain-photos>.
For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.
get · iOS 16.0+
duplicateAssets
Swift declaration
var duplicateAssets: some AssistantSchemas.Intent { get }
The app intent conforms to the schema for duplicating an asset.
## 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 `.photos.duplicateAssets` schema:
```swift
@AppIntent(schema: .photos.duplicateAssets)
struct DuplicateMediaAssetsIntent: AppIntent {
@Parameter
var entities: [PhotoEntity]
func perform() async throws -> some ReturnsValue<[PhotoEntity]> {
.result(value: [PhotoEntity()])
}
}
```
For more information about the `.photos` app intent domain,
see <doc:app-schema-domain-photos>.
For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.
get · iOS 16.0+
addAssetsToAlbum
Swift declaration
var addAssetsToAlbum: some AssistantSchemas.Intent { get }
The app intent conforms to the schema for adding an asset to an album.
## 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 `.photos.addAssetsToAlbum` schema:
```swift
@AppIntent(schema: .photos.addAssetsToAlbum)
struct AddMediaAssetsToAlbumIntent: AppIntent {
@Parameter
var assets: [PhotoEntity]
@Parameter
var album: PhotoAlbumEntity
func perform() async throws -> some IntentResult {
.result()
}
}
```
For more information about the `.photos` app intent domain,
see <doc:app-schema-domain-photos>.
For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.
get · iOS 16.0+
postToSharedAlbum
Swift declaration
var postToSharedAlbum: some AssistantSchemas.Intent { get }
The app intent conforms to the schema for posting an asset to a shared album.
## 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 `.photos.postToSharedAlbum` schema:
```swift
@AppIntent(schema: .photos.postToSharedAlbum)
struct PostToSharedAlbumIntent: AppIntent {
@Parameter
var sharedAlbum: PhotoAlbumEntity
@Parameter
var assets: [PhotoEntity]?
@Parameter
var files: [IntentFile]?
@Parameter
var comment: String?
func perform() async throws -> some IntentResult {
.result()
}
}
```
For more information about the `.photos` app intent domain,
see <doc:app-schema-domain-photos>.
For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.
get · iOS 16.0+
toggleSuggestedEdits
Swift declaration
var toggleSuggestedEdits: some AssistantSchemas.Intent { get }
The app intent conforms to the schema for enhancing an asset.
## 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 `.photos.toggleSuggestedEdits` schema:
```swift
@AppIntent(schema: .photos.toggleSuggestedEdits)
struct EnhanceMediaIntent: AppIntent {
@Parameter
var target: PhotoEntity
@Parameter
var isEnabled: Bool
func perform() async throws -> some IntentResult {
.result()
}
}
```
For more information about the `.photos` app intent domain,
see <doc:app-schema-domain-photos>.
For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.
get · iOS 16.0+
removeAssetsFromAlbum
Swift declaration
var removeAssetsFromAlbum: some AssistantSchemas.Intent { get }
The app intent conforms to the schema for removing an asset from an album.
## 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 `.photos.removeAssetsFromAlbum` schema:
```swift
@AppIntent(schema: .photos.removeAssetsFromAlbum)
struct RemoveMediaAssetsFromAlbumIntent: AppIntent {
@Parameter
var album: PhotoAlbumEntity
@Parameter
var assets: [PhotoEntity]
func perform() async throws -> some IntentResult {
.result()
}
}
```
For more information about the `.photos` app intent domain,
see <doc:app-schema-domain-photos>.
For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.
get · iOS 16.0+
updateRecognizedPerson
Swift declaration
var updateRecognizedPerson: some AssistantSchemas.Intent { get }
The app intent conforms to the schema for updating a recognized person in an asset.
## 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 `.photos.updateRecognizedPerson` schema:
```swift
@AppIntent(schema: .photos.updateRecognizedPerson)
struct UpdateMediaPersonIntent: AppIntent {
@Parameter
var target: PhotoPersonEntity
@Parameter
var isFavorite: Bool?
@Parameter
var name: String?
func perform() async throws -> some IntentResult {
.result()
}
}
```
For more information about the `.photos` app intent domain,
see <doc:app-schema-domain-photos>.
For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.
get · iOS 16.0+
crop
Swift declaration
var crop: some AssistantSchemas.Intent { get }
The app intent conforms to the schema for cropping an asset.
## 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 `.photos.crop` schema:
```swift
@AppIntent(schema: .photos.crop)
struct CropMediaIntent: AppIntent {
@Parameter
var target: PhotoEntity
func perform() async throws -> some IntentResult {
.result()
}
}
```
For more information about the `.photos` app intent domain,
see <doc:app-schema-domain-photos>.
For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.
get · iOS 16.0+
search
Swift declaration
var search: some AssistantSchemas.Intent { get }
The app intent conforms to the schema for searching the content in the media library.
## 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 `.photos.search` schema:
```swift
@AppIntent(schema: .photos.search)
struct SearchMediaIntent: ShowInAppSearchResultsIntent {
static var searchScopes: [StringSearchScope] = [.general]
@Parameter
var criteria: StringSearchCriteria
func perform() async throws -> some IntentResult {
.result()
}
}
```
For more information about the `.photos` app intent domain,
see <doc:app-schema-domain-photos>.
For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.
get · iOS 16.0+
setDepth
Swift declaration
var setDepth: some AssistantSchemas.Intent { get }
The app intent conforms to the schema for setting the aperture of an asset.
## 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 `.photos.setDepth` schema:
```swift
@AppIntent(schema: .photos.setDepth)
struct SetMediaDepthIntent: AppIntent {
@Parameter
var target: PhotoEntity
@Parameter
var value: Double?
func perform() async throws -> some IntentResult {
.result()
}
}
```
For more information about the `.photos` app intent domain,
see <doc:app-schema-domain-photos>.
For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.
get · iOS 16.0+
copyEdits
Swift declaration
var copyEdits: some AssistantSchemas.Intent { get }
The app intent conforms to the schema for copying edits to an asset.
## 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 `.photos.copyEdits` schema:
```swift
@AppIntent(schema: .photos.copyEdits)
struct CopyMediaEditsIntent: AppIntent {
@Parameter
var name: String
func perform() async throws -> some ReturnsValue<PhotoAlbumEntity> {
.result(value: PhotoAlbumEntity())
}
}
```
For more information about the `.photos` app intent domain,
see <doc:app-schema-domain-photos>.
For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.
get · iOS 16.0+
openAlbum
Swift declaration
var openAlbum: some AssistantSchemas.Intent { get }
The app intent conforms to the schema for opening an album.
## 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 `.photos.openAlbum` schema:
```swift
@AppIntent(schema: .photos.openAlbum)
struct OpenMediaAlbumIntent: OpenIntent {
@Parameter
var album: PhotoAlbumEntity
func perform() async throws -> some IntentResult {
.result()
}
}
```
For more information about the `.photos` app intent domain,
see <doc:app-schema-domain-photos>.
For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.
get · iOS 16.0+
openAsset
Swift declaration
var openAsset: some AssistantSchemas.Intent { get }
The app intent conforms to the schema for opening an asset.
## 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 `.photos.openAsset` schema:
```swift
@AppIntent(schema: .photos.openAsset)
struct OpenMediaAssetIntent: OpenIntent {
@Parameter
var target: PhotoEntity
func perform() async throws -> some IntentResult {
.result()
}
}
```
For more information about the `.photos` app intent domain,
see <doc:app-schema-domain-photos>.
For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.
get · iOS 16.0+
setFilter
Swift declaration
var setFilter: some AssistantSchemas.Intent { get }
The app intent conforms to the schema for applying a filter to an asset.
## 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 `.photos.setFilter` schema:
```swift
@AppIntent(schema: .photos.setFilter)
struct ApplyMediaFilterIntent: AppIntent {
@Parameter
var target: PhotoEntity
@Parameter
var filterType: PhotoFilterEffectType?
func perform() async throws -> some IntentResult {
.result()
}
}
```
For more information about the `.photos` app intent domain,
see <doc:app-schema-domain-photos>.
For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.
get · iOS 16.0+
setWarmth
Swift declaration
var setWarmth: some AssistantSchemas.Intent { get }
The app intent conforms to the schema for setting the warmth of an asset.
## 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 `.photos.setWarmth` schema:
```swift
@AppIntent(schema: .photos.setWarmth)
struct SetMediaWarmthIntent: AppIntent {
@Parameter
var target: PhotoEntity
@Parameter
var value: Double?
func perform() async throws -> some IntentResult {
.result()
}
}
```
For more information about the `.photos` app intent domain,
see <doc:app-schema-domain-photos>.
For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.