Pages

Monday, May 16, 2016

Developing for Apple Watch


With Apple Watch, users can now access information in a way that is both distinctly personal and unobtrusive. With just a raise of the wrist, users can receive and respond to notifications, see essential information in a complication or a glance, and much more. Developing for Apple Watch means providing your users with important, helpful, and impactful information in the most immediate, convenient way (Figure 1-1).
Figure 1-1The Apple Watch Home screenimage: ../Art/watch_hero_2x.png
The projects you create for Apple Watch consist of two separate bundles: a Watch app and a WatchKit extension. The Watch app bundle contains the storyboards and resource files associated with all of your app’s user interfaces. The WatchKit extension bundle contains the extension delegate and the controllers for managing those interfaces and for responding to user interactions. While these bundles are distributed inside an iOS app, they are then installed on the user’s Apple Watch and run locally on the watch.
A watchOS project must include a Watch app, but may also include a glance, custom notifications, and complications. Each of these interfaces provides a unique way for users to interact with your app, often conveying important information to the user more quickly than the app’s main interface. Although optional, these interfaces should not be considered secondary. In fact, the glance, notifications, and complications are the primary interfaces for many users.
The glance, notifications, and complications are not separate executables. Instead, the interface for the glance and notifications are included in your Watch app’s storyboard. The code for managing the glances, notifications, and complications are part of your WatchKit extension.

The Watch App

The Watch app is the actual app that the user launches from the Apple Watch Home screen. The Watch app presents your app’s full user interface. The app supports one or more screens of custom content that you define. Use the Watch app to present all of the content you support on Apple Watch, which is often only a subset of the content you support in your iOS app.
To create a Watch app, see UI Essentials.

The Glance Interface

As the name implies, a glance is meant to be looked at quickly. With a swipe from the bottom of the watch face, a glance displays only your app’s most important information. Glances are nonscrolling; the entire glance interface must fit on a single screen, and the information in a glance is read-only, so glances do not contain buttons, switches, or other interactive controls. Tapping a glance launches your Watch app’s main interface.
To create a glance interface, see Glance Essentials.

Custom and Actionable Notifications

Apple Watch works with its paired iPhone to display local and remote notifications. Initially, Apple Watch uses a minimal interface—called a short look—to display incoming notifications. If the user’s wrist remains raised, the minimal interface changes to a more detailed interface—called a long look—displaying the contents of the notification. You can customize the long look, adding custom graphics or arranging the notification data differently from the default interface provided by the system.
Apple Watch also provides automatic support for actionable notifications. Actionable notifications let you add buttons or text input to your notification interface, so that users can respond directly to the notification. For example, a notification for a meeting invitation might include buttons to accept or reject the invitation.
When your iOS app registers support for actionable notifications, Apple Watch automatically adds buttons for notification actions to the notification interfaces on Apple Watch. All you need to do is handle the user’s actions in your WatchKit extension.

To create custom notification interfaces and actionable notifications, see Notification Essentials. For more information on registering actionable notifications, see Registering Your Actionable Notification Types inLocal and Remote Notification Programming Guide.

Complications

Complications are small visual elements that appear directly on the watch face and convey important information to the user. Complications are automatically visible whenever the user looks at Apple Watch to check the time. Most watch faces support at least two or three complications, and the user can customize which complications are displayed. Apps may use a complication to display app-specific data.
For information about complications and how to implement them, see Complication Essentials.

Designing Your User Interface

The personal nature of Apple Watch requires a different approach when it comes to designing Watch app, glance, notification, and complication interfaces. Your interfaces need to display information quickly and facilitate fast navigation and interactions. Creating that kind of interface means you should not simply port your existing iOS app behavior over to Apple Watch. Instead, create a complementary experience to your iOS app.
Additionally, the Watch app, glance, notifications, and complications each have their own unique role. Complications provide immediate access to information directly on the watch face; however, they are limited in both the amount and type of information they can present. Notifications are presented to the user as an alert, giving them a way to take a specific yet quick action. Glances are easily accessible with just a swipe from the bottom of the watch face. They give the user a more information than a complication but are still focused on quick, easily digestible pieces of information. Finally, the Watch app can provide a richer experience with an opportunity for further interaction and input by the user, but should still be designed for quick, streamlined interactions.
For guidance on designing interfaces for Apple Watch, see Apple Watch Human Interface Guidelines. In particular, the App Components section describes the differences between the Watch app, glances, notifications, and complications.

0 comments:

Post a Comment