On the lock screen, notifications always appear as informational, noninteractive banners that don’t dismiss or display action buttons until the Mac is unlocked. Clicking a notification when the Mac is unlocked dismisses the notification, removes it from Notification Center, opens the corresponding app, and shows related information.
For developer guidance, see Local and Remote Notification Programming Guide.
TIP Notification Center also includes a Today pane, which displays the user’s widgets. A widget is an extension that displays a small amount of timely, useful information or app-specific functionality. See Notification Center Widgets.
Provide useful, informative notifications. People enable notifications to get quick updates, so focus on providing information of value. Use complete sentences, sentence-style capitalization, proper punctuation, and don’t truncate your message—the system does this automatically, if necessary. Avoid telling people to open your app, navigate to specific screens, click specific buttons, and perform other tasks that are hard to remember once the notification is dismissed.
Don’t use notifications to display error messages. People generally expect notifications to be informational and deferrable. If you need to display an error message, an alert has greater impact than a notification. See Alerts.
Handle notifications gracefully if your app is in the foreground. Your app’s notifications don’t appear onscreen when your app is in the front, but your app still receives the information. Present it to the user in a way that’s informative but not distracting or invasive. For example, you might display or increment a badge or subtly insert new data into the current view.
Don’t send multiple notifications for the same thing, even if the user hasn't responded. People attend to notifications at their convenience. If you send multiple notifications for the same thing, you fill up Notification Center, and users may turn off notifications from your app.
Don’t include your app name or icon. The system automatically shows this information at the top of each notification.
Choose an appropriate default notification style. Since banner-style notifications disappear after a few seconds, use the alert style when delivering essential information that may immediately impact the user. Just remember that alert-style notifications disrupt the user experience. Use them sparingly so users don’t get annoyed and turn them off.
Use badging to supplement notifications, not to denote critical information. Badging of your app can be turned off: if your app relies on badging to communicate important information, you run the risk of people missing it.
Keep badges up to date. Update your app’s badge as soon as the corresponding information is read. You don’t want people to think there’s new information available, only to find that they’ve already seen it.
Provide a sound to supplement your notifications. Sound is a great way to get someone's attention when they’re not looking at the screen. A to-do list app might play an alert sound, for example, when it’s time to perform an important task. Your app can use a custom or a built-in alert sound. If you use a custom sound, make sure it’s short, distinctive, and professionally produced. See Preparing Custom Alert Sounds in Local and Remote Notification Programming Guide. Keep in mind that people can optionally disable notification alert sounds.
Provide intuitive, beneficial action buttons. A notification can include up to two action buttons for performing common, time-saving tasks that eliminate the need to open your app. Use short, title-case names that clearly describe the action results. For example, Reminders uses Snooze to let you defer a reminder until a later time. The system may truncate lengthy button names to fit.
Avoid providing destructive action buttons. Think carefully before providing destructive actions in a notification detail view. If you must provide them, make sure people have enough context to prevent unintended consequences.