One Logo Pool Ball
AppIntents · IOS API REFERENCE

AssistantSchemas.FilesEntity

protocol · iOS 16.0+ · SDK 27.1

protocol FilesEntity : AssistantSchemas.Model

Assistant schema conformance for app entities that describe files.

Members (1)

get · iOS 16.0+

file

Swift declaration
var file: some AssistantSchemas.Entity { get }

The app entity describes a file. ## 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 `.files.file` schema: ```swift @AppEntity(schema: .files.file) struct ExampleFileEntity: FileEntity { var displayRepresentation: AppIntents.DisplayRepresentation { "Example File" } static var supportedContentTypes = [UTType.image] var id: FileEntityIdentifier @Property var creationDate: Date? @Property var fileModificationDate: Date? struct Query: EntityStringQuery { func entities(for identifiers: [ExampleFileEntity.ID]) async throws -> [ExampleFileEntity] { [] } func entities(matching string: String) async throws -> [ExampleFileEntity] { [] } } } ``` For more information about the `.files` app intent domain, see <doc:app-schema-domain-files>. For general information about app intent domains, see <doc:making-actions-and-content-discoverable-by-apple-intelligence>.

Skipped declarations

No declarations were skipped in this snapshot.

All AppIntents types →