draftIdentifier
TypeScriptget draftIdentifier(): (string) | nullSwift declarationvar draftIdentifier: String? { get }The document draft identifier, if the document hasn't been materialized on disk yet.
struct · iOS 18.0+ · SDK 27.1
struct FileEntityIdentifierAn identifier for an app entity that refers to a document or other file.
get draftIdentifier(): (string) | nullSwift declarationvar draftIdentifier: String? { get }The document draft identifier, if the document hasn't been materialized on disk yet.
static entityIdentifier(entityIdentifierString: string): (FileEntityIdentifier) | nullSwift declarationstatic func entityIdentifier(for entityIdentifierString: String) -> FileEntityIdentifier?Identifiers should be able to initialize via a `String` format.
get entityIdentifierString(): stringSwift declarationvar 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 file(url: string): FileEntityIdentifierSwift declarationstatic func file(url: URL) throws -> FileEntityIdentifierCreates and returns an identifier with the provided URL to the file on disk.
static draft(identifier: string): FileEntityIdentifierSwift declarationstatic func draft(identifier: String) -> FileEntityIdentifierCreates 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 fileURL(): Promise<(string) | null>Swift declarationvar 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 isDraft(): booleanSwift declarationvar isDraft: Bool { get }Indicates whether this identifier represents a document draft.
No declarations were skipped in this snapshot.