updateAsset
The app intent conforms to the schema for updating an asset.
Declaration
var updateAsset: some AssistantSchemas.Intent { get }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:
@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 Photos. For general information about app intent domains, see Making actions and content discoverable by Apple Intelligence.