Responding to Notifications

The extension delegate also handles local and remote notifications for watchOS apps. The methods to implement in the protocol mirror those for responding to notifications on iOS and for good reason—one of the primary use cases of the Apple Watch is to act as a conduit for iOS app notifications—whether or not the app has an Apple Watch--specific app. When the user’s iPhone is locked and the Apple Watch is unlocked, all notifications are routed to the watch by default. The real power of notifications on the watch comes with actions associated with these notifications; as you can see in this screenshot, a notification can include buttons that perform actions when the user selects them. When a notification comes ...

Get Developing for Apple Watch, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.