Guides and Sample Code


macOS Human Interface Guidelines



An interoperable app communicates seamlessly with other apps and features. Users appreciate interoperability because it means that they can focus on their content, without having to pay attention to app-management details.

Be prepared for app extensions. Users expect to be able to use app extensions to perform targeted tasks while they’re pursuing a larger goal within your app. For example, users can view an image in TextEdit and edit the image by opening it in the system-provided Markup app extension. To learn more about app extensions, see Services.

image: ../Art/extensions_prefs_2x.png

Incorporate Handoff, if appropriate. Handoff lets users begin an activity on one device, then switch to another device and resume the same activity on the other device. Because Handoff is based on the concept of user activities, you identify the activities in your app that users might want to continue on another device. To learn more about Handoff, see Handoff Programming Guide.

As much as possible, avoid using custom file formats. Instead, use standard file formats so that users can easily exchange documents with other users or open them in different apps. If you must use a custom file format, be sure to provide import and export capabilities so that users can exchange data with other apps and the system. If necessary, also include a Quick Look generator to convert your native document format into a format the Finder and Spotlight can display. For more information about integrating well with the Finder and with Spotlight, see The Finder and Spotlight.

Avoid calling attention to file formats. It’s best when users don’t have to think about file formats (note that users can turn off the display of filename extensions in Finder preferences). In general, users expect to be able to open other documents in your app and to share with others the documents they create in your app. Be sure to include a filename extension appropriate to the contents of the document. At the same time, respect the user's filename extension preferences when displaying the names of files and documents within your app.

Use the same file format on all platforms you support. Using the same format on all platforms ensures that users can use your app to view their content regardless of the device or platform they’re using.

Support filename extensions. A filename extension identifies the document’s type in a way that all platforms understand. Although macOS users can hide the display of filename extensions, you support them so that apps on other platforms can recognize and open the files that your app creates.

Use the user defaults system to store preferences. When you use the user defaults system to manage your app’s configuration information, the data is generally stored in property list files. In your app, you use the shared NSUserDefaults object to access and modify this information. To learn more about this object, see NSUserDefaults Class Reference.

Use standard protocols for data interchange. XML is the preferred format for exchanging data among apps and platforms because it is cross-platform and widely supported.

Use Bonjour to automatically discover devices and network services on IP networks. Don’t make the user type in an IP address or configure a DNS server.