Guides and Sample Code

Developer

macOS Human Interface Guidelines

iBooks

Auto Save and Versions

Document-based apps can free users from having to save their work explicitly or worry about losing unsaved changes. When document-based apps enable Auto Save, the system automatically writes document data to disk as needed, without necessarily creating additional copies.

Versions displays an immersive interface in which users can browse earlier versions of their document and replace their working document with a previous version. Auto Save and Versions work together to reduce file-management tasks and help users focus on creating content.

image: ../Art/auto_save_versions_2x.png

If your app is document-based, you can enable Auto Save with comparatively little effort. (When you adopt Auto Save, version browsing is enabled automatically.) To learn the programmatic steps you need to take to opt in to Auto Save, see Documents Are Automatically Saved.

To help users enjoy the full benefits of Auto Save and Versions in your app, follow these guidelines:

Avoid implying that users will lose their work unless they choose File > Save. You want to help users understand that your app will always save their work unless they explicitly choose to discard it. In particular, you want to help users learn that the primary use for the Save command is to give them the opportunity to specify the name and location of a document, not to save their content. A good way to emphasize this point is to automatically save content in an untitled document unless the user closes the window and declines to name the document.

As much as possible, avoid displaying a dot in the document window’s close button. In earlier versions of macOS, a document with unsaved changes always displayed a dot in the close button, which indicated the “dirty state.” To encourage users to embrace the Auto Save experience, you want them to get out of the habit of checking the close button to see if they need to save their work. In general, only apps that are not document-based should regularly display a dot to indicate unsaved changes.

When possible, you should also avoid displaying a dot next to a document’s name in the Window menu. To learn more about the contents of the Window menu, see The Window Menu.

Don’t ask users to save when they log out, restart, or quit your app. Users should not be presented with a Save dialog unless they explicitly close a document window that contains content that has never been named. When a document window closes as the result of another action (such as when the user logs out) the content should be automatically saved even if the user has never titled it. In this way, the user’s work is automatically saved in all circumstances, unless the user explicitly chooses to throw it away.