One Logo Pool Ball
AppIntents · IOS API REFERENCE

FileEntityIdentifier

struct · iOS 18.0+ · SDK 27.1

struct FileEntityIdentifier

An identifier for an app entity that refers to a document or other file.

Members (7)

get · iOS 18.0+

draftIdentifier

TypeScript
get draftIdentifier(): (string) | null
Swift declaration
var draftIdentifier: String? { get }

The document draft identifier, if the document hasn't been materialized on disk yet.

static · iOS 18.0+

entityIdentifier

TypeScript
static entityIdentifier(entityIdentifierString: string): (FileEntityIdentifier) | null
Swift declaration
static func entityIdentifier(for entityIdentifierString: String) -> FileEntityIdentifier?

Identifiers should be able to initialize via a `String` format.

get · iOS 18.0+

entityIdentifierString

TypeScript
get entityIdentifierString(): string
Swift declaration
var entityIdentifierString: String { get }

The `AppEntity`'s identifier value as a `String`. Note: Due to system-imposed limitations, **the length of this value can not exceed 4096 characters**!

static · iOS 18.0+

file

TypeScript
static file(url: string): FileEntityIdentifier
Swift declaration
static func file(url: URL) throws -> FileEntityIdentifier

Creates and returns an identifier with the provided URL to the file on disk.

static · iOS 18.0+

draft

TypeScript
static draft(identifier: string): FileEntityIdentifier
Swift declaration
static func draft(identifier: String) -> FileEntityIdentifier

Creates and returns an identifier for a draft document. Only use this method to initialize identifiers for documents which aren't materialized on disk yet and don't have a file URL.

get · iOS 18.0+

fileURL

TypeScript
get fileURL(): Promise<(string) | null>
Swift declaration
var fileURL: URL? { get async throws }

A URL that locates a file saved to disk. If the file is saved outside of your app's container, make sure to surround access to file contents with `startAccessingSecurityScopedResource()` and `stopAccessingSecurityScopedResource()`.

get · iOS 18.0+

isDraft

TypeScript
get isDraft(): boolean
Swift declaration
var isDraft: Bool { get }

Indicates whether this identifier represents a document draft.

Skipped declarations

No declarations were skipped in this snapshot.

All AppIntents types →