Auto Save

Document-based apps can implement Auto Save to automatically save versions of documents as the user works on them. Auto Save reduces manual work while editing documents, increasing focus on content creation and insuring the preservation of data. When Auto Save is enabled, a version of the document is automatically saved at least once per hour, and each time the document is opened, duplicated, locked, renamed, reverted, or manually saved. At any time, the user can browse through these saved versions and revert back to one.

Enable Auto Save if your app is document-based. In general, people expect their content to be saved continuously and without intervention. Opt-in to Auto Save so they can rely on these behaviors in your app. Note that Auto Save requires minimal effort to adopt. For developer guidance, see the autosavesInPlace() function of NSDocument.

Present a Save dialog only when the user explicitly tries to save or close a previously unsaved document containing content. An existing document should save changes automatically whenever the user closes the document, quits the app, logs out, or restarts. If a document wasn’t previously saved and the user quits the app, logs out, or restarts, the document should automatically be saved in temporary form and restored the next time the app opens. These behaviors ensure that work is always saved unless the user explicitly chooses not to keep it.

In general, use a dot to mark a modified document as unsaved only when it can't be autosaved. If a document can be autosaved, there shouldn’t be a dot on the close button in the document’s title bar and next to the document’s name in the Window menu. It’s fine to append an Edited suffix to the document's title in the title bar, but this suffix should be removed when the document is closed or the user manually performs a save.

Behave appropriately when Auto Save is disabled. Users can disable Auto Save by selecting the “Ask to keep changes when closing documents” checkbox in the General system preference pane. When Auto Save is disabled, your app should exhibit the expected behavior when there are unsaved changes. Specifically, your app should denote that there are unsaved changes and present the Save dialog when the user tries to close the document, quit the app, log out, or restart.