Working with user files.
WHAT A DOCUMENT-BASED APPLICATION IS
One where each window represents a file the user owns.
WHAT THE SYSTEM PROVIDES
Opening, saving, renaming, versioning and restoring Automatic saving Conflict handling for files stored in the cloud
WHAT TO ADOPT
That machinery, rather than implementing saving yourself.
WHY
Users expect versions, autosave and restore to work as they do elsewhere.
WHAT TO DECLARE
The file types your application handles, and whether it owns or merely reads them.
WHAT THAT AFFECTS
Whether your application appears as a choice for those files.
WHAT SANDBOXING RESTRICTS
Access to files, limited to those the user selected.
WHAT SECURITY-SCOPED BOOKMARKS PROVIDE
Continued access to a chosen file across launches.
WHY THAT MATTERS
Without them, access is lost when the application restarts.
WHAT TO HANDLE
Files moved or deleted while open Files changed by another application Network volumes disappearing
WHAT TO NEVER ASSUME
That a path remains valid.
WHAT TO TEST
Working with files on external and network volumes.