recognizedPerson
The app entity describes a person who appears in an asset.
Declaration
var recognizedPerson: some AssistantSchemas.Entity { get }Overview
Use Swift macros that generate additional properties and add protocol conformance for your app entity implementation. The following example shows an app entity that conforms to the .photos.recognizedPerson schema:
@AppEntity(schema: .photos.recognizedPerson)
struct PhotoPersonEntity: AppEntity {
struct Query: EntityStringQuery {
func entities(for identifiers: [PhotoPersonEntity.ID]) async throws -> [PhotoPersonEntity] { [] }
func entities(matching string: String) async throws -> [PhotoPersonEntity] { [] }
}
static var defaultQuery = Query()
var displayRepresentation: DisplayRepresentation { "Photo Person" }
let id = UUID()
@Property
var name: String
@Property
var isFavorite: Bool
}For more information about the .photos app intent domain, see Making photo and video actions available to Siri and Apple Intelligence. For general information about app intent domains, see Integrating actions with Siri and Apple Intelligence.