The OS X Environment

Mac computers are stylish, flexible, easy to set up, easy to maintain, and powerful. OS X builds on this foundation, combining a reliable core with an intuitive design, stunning graphics, excellent security, and the features users want.

To develop a great Mac app, you first need to understand the OS X environment and why users love it. With this understanding, you can ensure that your app takes advantage of platform features and provides a user experience that seamlessly integrates with the environment.

OS X Helps Users Focus on Their Content

OS X is founded on the understanding that people use computers to create and experience the content they care about. On a Mac, people are free to focus on their content because OS X performs many of the routine app-management tasks that users shouldn’t have to handle. As you consider how your app fits into the OS X environment, it’s instructive to see how this perspective pervades every ingredient of the Mac experience.

OS X includes many features that relieve users of common app-management tasks. These features instead help them concentrate on the tasks they want to accomplish. For example, popovers appear when users need them and disappear when users are finished with them (in effect, popovers manage themselves). Another example is the fact that Launchpad and the Dock don't need to show whether an app is currently running. When users click an app’s icon in Launchpad or the Dock, a window opens; users don’t need to know whether the app started or simply brought a window into view.

Many OS X features (such as iCloud, Auto Save, and Resume) help users avoid two of the most frequent app-management tasks: saving a document and reopening windows that were open the last time an app was running.

iCloud frees users from worrying about where their content is stored. They can access their content from multiple devices through different instances of your app. With iCloud, users make changes to a document and can view those changes on another device without transferring files.

Auto Save and Versions make document saving and version control easy for users. After users title a new document and give it a location, they don’t have to worry about explicitly saving it when they make changes because Auto Save keeps the working document up to date. In addition, users can save specific versions of their work for later reference. Document-based apps can use Versions to display a Time Machine–like interface in which users can browse their earlier document versions and, if they choose, replace the current document with a different version.

Resume allows apps to reopen in the same state in which users left them. After restart or log in, OS X automatically relaunches the apps that were last running and restores the windows that were last opened. When an app provides the necessary support, reopened windows have the same size and location as before; in addition, their contents are scrolled to the previous position and their selections are restored.

To learn more about enhancing the user experience of your app by rethinking the some of the tasks that users typically perform, see “Avoid Burdening Users with App-Management Tasks.”

Full-Screen Windows Help Users Concentrate

Sometimes, it makes sense for an app to offer an immersive, full-screen window experience that allows users to focus on a task and avoid distractions. For example, Mail helps users read mail, manage their messages, and compose new messages within a full-screen environment.


When an app uses APIs to support full-screen windows, the standard full screen button (that is, ../art/EnterFullscreen.jpg) is added to the upper-right corner of the title bar. The app also adds the Enter Full Screen menu item to the View menu (to learn more about this menu, see “The View Menu”).

When users click the full screen button or choose View > Enter Full Screen, the app moves the window into a new space, increasing the window’s size during the transition. While users are in the full-screen window, they can reveal the menu bar and the Dock (if they are hidden) and activate Mission Control. They can also move to a different desktop or full-screen window, or they might choose to take the window back to its standard size by clicking the full screen button again or choosing View > Exit Full Screen.

Because a window remains full screen even when users switch away from it, users can leave an immersive task and come back to it later (including after a log out). Users appreciate this behavior because it allows them to create several different environments on one system.

Note that opening a full-screen window to perform a focused task differs from the full-screen experience provided by Time Machine or Versions. These system features temporarily commandeer the user’s current desktop to enable a brief user-initiated task (that is, viewing Time Machine backups or different versions of a document). Mac apps don't generally need to enable this type of full-screen experience.

To learn about when and how to provide a great full-screen window experience, see “Allow Users to Go Full Screen (if Appropriate).”

OS X Supports Multiple Displays with Different Resolutions

OS X runs on systems with displays of varying size, resolution, and number. For example, some users prefer to spread their work across one main screen and a couple of auxiliary screens. Other users might use a display that rotates. Users expect their apps to run smoothly and look great, regardless of the number or type of displays they’re using.

Users can expand their workspace by adding displays to the system. Mac users have always enjoyed the option of using more than one display plugged into a single computer. Successful Mac apps accommodate this usage pattern by paying attention to the location of the menu bar and opening new windows where the user expects. To learn more about opening and positioning a window appropriately, see “UI Element Guidelines: Windows.”

Some users have the ability to rotate their displays, which reverses the aspect ratio of the screen. For example, if a user's display is set to a screen resolution of 1024 x 768 (an aspect ratio of 1.33:1), after rotation the screen resolution is 768 x 1024 (an aspect ratio of .75:1). A good Mac app pays attention to screen-update events and responds appropriately.

High-resolution displays call attention to app graphics. In particular, a high-resolution display can make an unprepared app look bad, especially one that specifies drawing measurements in pixels instead of points. For an overview of issues to address in your code, see High Resolution Guidelines for OS X. To learn more about creating graphics that look great at any resolution, see “Creating Great Icons for Any Resolution.”

All Apps Use the Single Menu Bar

The menu bar extends across the top of the main screen and contains the current app’s menus, among other items. The location of the menu bar is always the same, but users can change its opacity and, under some circumstances, the menu bar can be hidden.

The system, the active app, and the user define the items that appear in the menu bar. For example, when the Finder is active, the Finder menus are in the left of the menu bar and some user-specified items are in the right.

The menu bar displayed when the Finder is activeThe menu bar displayed when the Finder is active

The menu bar always contains:

In addition, the menu bar might contain the following menus, if they make sense in the active app:

Finally, users can specify menu bar extras, which are items such as date and time, battery charge, and current locale, that are displayed in the right end of the menu bar.

All apps put their menus in the menu bar; they never provide a bar of menus within a window. This ensures that users always know where to look for app commands. To learn more about how menus behave, see “Menu Appearance and Behavior.”

The menu bar is always visible, except in specific, temporary circumstances. For example, during a slideshow or as an option when a window is full screen, the menu bar can be hidden. If the menu bar is hidden, users can reveal it by moving the pointer to the upper edge of the screen. In rare circumstances, such as when users view Time Machine backups or browse earlier versions of a document, the menu bar is unavailable until users finish the task.

To learn how to design your app’s menu bar menus, see “Designing Menus for the Menu Bar.”

Apps Respond to Gestures, Clicks, and Keystrokes

Users expect to be able to interact with their Mac using the input device of their choice. Some users might use a one-button or multibutton mouse, others might be more comfortable with a trackpad, and still others might use their voice or an assistive device to control their computer. As with the built-in apps, the best apps make no assumptions about the type of input device the user is using.

The trackpad offers an alternative way to interact with Mac apps and the system. People use their fingers on the trackpad to perform actions they might otherwise perform using a mouse, such as move the pointer, select or activate a UI element, and scroll.

In addition to such actions, a Multi-Touch trackpad can support gestures that perform more complex behaviors, such as:

To perform some of these actions, users can change the gesture they want to use in Trackpad preferences. For example, a user might prefer to swipe with two or three fingers (instead scroll left or right with two fingers) to swipe between pages.


Users expect to be able to activate systemwide features, such as Mission Control and switching between desktops and full-screen windows, regardless of the app they’re currently using. Great Mac apps pay attention to the behavior associated with a gesture, in addition to the physical gesture itself, so that users can enjoy a consistent gesture experience throughout the system. To learn about supporting gestures in your app, see “Handle Gestures Appropriately.”

All users need to use the keyboard sometimes, and some users prefer using the keyboard to using a mouse or trackpad. Other users, such as VoiceOver users, might use only the keyboard. All keyboard users expect the system-defined and common keyboard shortcuts they’re familiar with to work seamlessly in all apps. To learn more about the system-reserved and commonly used keyboard shortcuts, see “Keyboard Shortcuts.”

OS X also provides full keyboard access mode, in which users can navigate through windows and dialogs. When this mode is active, other keyboard combinations may be reserved by default. (Users turn on full keyboard access in Keyboard preferences.)

Finally, OS X reserves several key combinations for use with localized versions of system software, localized keyboards, keyboard layouts, and input methods. These key combinations (listed in Table 1-1) don’t correspond directly to menu commands.

Table 1-1  Key combinations reserved for international systems



Command–Space bar

Rotate through enabled script systems

Option–Command–Space bar

Rotate through keyboard layouts and input methods within a script

modifier key–Command–Space bar

Apple reserved

Command–Right Arrow

Change keyboard layout to current layout of Roman script

Command–Left Arrow

Change keyboard layout to current layout of system script

To learn about creating keyboard shortcuts for commands in your app, see “Provide Keyboard Shortcuts for Frequently Used Commands.”

Users Can Customize Their Experience in Preferences

OS X provides the built-in System Preferences app, in which users can specify system behaviors and appearances. For example, users can set a different desktop picture in Desktop & Screen Saver preferences.


In addition, each Mac app can supply its own preferences, which allow users to customize app-specific behaviors and appearances. As with OS X itself, great apps combine default settings that give most users what they want with a convenient way to make changes to those settings. For example, the General preferences pane in Mail allows users to adjust a range of settings, such as the sound that accompanies the arrival of a new message and the folder that contains downloaded attachments.


For some guidance on how to provide preferences in your app, see “Preferences.”

Users expect to use the Preferences command in the app menu to access app-specific preferences. The consistent location of this command ensures that users always know how they can fine-tune the current app, if necessary. To learn more about the Preferences command, see “The App Menu.”

User Help Is Unobtrusively Available

Occasionally, users need help understanding how to use a control or perform a task. OS X provides two help mechanisms that supply help to users without getting in their way.

UI element–specific help is provided in a short message that appears when users allow the pointer to rest on the element for a few seconds. This message, called a help tag, is a brief description of what the UI element does. For example, Mail displays help tags for most of its controls, such as the Format button.


For some guidelines on how to craft good help tags, see “User Assistance.”

OS X also provides a systemwide Help window that all apps use to display in-depth, task-focused help content. The Help window floats above the main windows of an app in the same layer as the app’s dialogs and alerts (to learn more about window layering, see “Layering”). This position allows users to follow the instructions in the Help window while they use the app. For example, Mail supplies extensive help content in the Help window, such as instructions on how to add attachments to a message.


Users open the Help window by choosing an item in the app’s Help menu, pressing Command-?, or in some cases clicking the Help button in a window (to learn how to include the Help button in a window, see “The Help Button”). Apps supply help content to display in the Help window by including a help book in their app bundle (to learn how to do this, see Apple Help Programming Guide).

Multiple Users Can Use a Single System

OS X is a multiple-user system. Not only does the system support multiple user accounts, it allows multiple users to be logged in simultaneously so that they can share the same computer in quick succession. This feature employs a technique known as fast user switching, in which users trade use of the computer without logging out.

The fast user switching menu is displayed by clicking the current user’s name in the menu bar. The menu lists the names of the other users who have accounts on the computer (and whether they’re currently logged in).


When a different user’s name is chosen in the fast user switching menu, the current desktop (or full-screen window) is veiled and a login window appears. The new user logs in, sees the system exactly as they left it, and immediately gets access to their content.

With multiple users accessing the computer, conflicts can arise if apps are not careful about how they use shared resources. Great apps take care to avoid making assumptions about the current user’s privileges and access to system resources and external devices.

To learn more about the ramifications of a multiuser system, see Multiple User Environment Programming Topics. To learn about some ways to provide a good multiuser experience in your app, see “Adapt to Changes in the User's Environment.”

Accessibility and Internationalization Are Fully Supported

Accessibility means that individuals with disabilities can have full use of system features, perhaps with the help of an assistive device, such as a screen reader. Internationalization means that an app’s text, layout, and images can be adapted to the user’s locale. Great Mac apps integrate both of these qualities so that they can appeal to a worldwide audience.

OS X includes many built-in features that help individuals with disabilities use their Mac, such as:

The OS X accessibility programming interfaces make it easy for apps to be fully accessible. To find out more about designing your app with accessibility in mind, see “Accessibility.” To learn about the easy programmatic steps you need to take to make your app accessible, see Accessibility Overview for OS X.

Great apps use the language and images that make their users feel at home, regardless of the country they’re in. OS X provides several features that make localization easier, including Autolayout in Interface Builder. Using Autolayout, you can define how text and layout are related, so that an app’s appearance can remain consistent regardless of the length of the text. To learn more about Autolayout, see Auto Layout Guide. To learn more about designing your app with internationalization in mind, see “Internationalization.”

Clean, Beautiful Typography Pervades the UI

OS X makes it easy for apps to use the same anti-aliased, easy-to-read fonts that users are accustomed to seeing throughout the system. OS X makes these fonts available through Interface Builder and the NSFont class. Great apps use the system-provided fonts appropriately, which helps the UI stay subordinate to the user’s content.

The system font (Lucida Grande Regular 13 point) is used for text in menus, dialogs, and full-size controls.

The emphasized system font (Lucida Grande Bold 13 point) is used sparingly, most often in the message of an alert.

The small system font (Lucida Grande Regular 11 point) is used for the informative text in alerts. It is also the default font for column headings in lists, for help tags, and for small controls.

The emphasized small system font (Lucida Grande Bold 11 point) is used occasionally, most often to title a group of settings that appear without a group box, or for brief informative text below a text field.

The mini system font (Lucida Grande Regular 9 point) is used for mini controls. It is also used for panel labels and text.

An emphasized mini system font (Lucida Grande Bold 9 point) is used in cases in which the emphasized small system font is too large.

The app font (Lucida Grande Regular 13 point) is used as the default font for user-created content.

The label font (Lucida Grande Regular 10 point) is used for the labels on toolbar buttons and to label tick marks on full-size sliders.

The view font (Lucida Grande Regular 12 point) is the default font used for text in lists and tables.

The Lucida Grande font family also includes mono-spaced numeric characters and variably-spaced alphabetics.

Interface Builder automatically supplies the correct default font, based on the size and type of control being used. For more information about using fonts, see Font Handling.

Apps Use Bundles to Manage Code and Resources

App bundles are the preferred mechanism for software distribution because they simplify installation and are easy for the user to move around in the Finder. In addition, if you want to submit your app to the App Store, it is expected that your app will use bundles.

A bundle includes all an app’s required resources and it helps manage the coordination of global and localized resources. Bundles also allow apps to avoid storing data in a resource fork, which is no longer an appropriate way to store app resources. To learn more about app bundles, see “The OS X Application Bundle” in Mac App Programming Guide.