WatchKit gives an early glimpse into how Apple Watch works

· 6 minute read · via Punchkick
Featured image for An Apple Watch Sport with a pink band on a wrist, showing the honeycomb home screen of circular app icons

As promised, Apple released its WatchKit framework yesterday to allow developers to begin exploring the company’s forthcoming Apple Watch. But beyond the new controllers and tools for developers, the released documentation also shines a light on Apple’s secretive new product. Overnight, both developers and the public have learned a ton of interesting things about how building for—and using—Apple Watch is going to look and feel.

Watch apps are extensions of iOS apps—for now

One of the most critical clarifications about how Apple Watch apps fit into Apple’s larger ecosystems was around how Watch apps interact with their iOS counterparts. Apps on Apple Watch are user interface bundles that interact with third-party iOS apps through an included WatchKit extension on the iPhone side. WatchKit is another type of app extension available as part of Extensibility in iOS 8, meaning developers can write and include a WatchKit extension as part of their iOS app. The iOS version of an app is responsible for installing and running the Watch app on Apple Watch. Here’s how it works.

The user interface for a Watch app—the primary UI design elements and storyboard—are all that is loaded onto Apple Watch. These screens are activated when a user interacts with the Watch app on their Apple Watch, and the Watch app tells its iPhone counterpart to run its WatchKit extension. While the user pokes around the third-party Watch app, information passes back and forth between Apple Watch and the WatchKit extension on the iPhone. This means that developers need to plan their UI states in advance and load all possible storyboards directly onto Apple Watch. Code from the WatchKit extension on the iPhone can update the interface with images and other new content, but this code isn’t executed on Apple Watch—for now.

As it stands, only small tasks like dates and timers run within Watch apps themselves, and do not require intervention from the WatchKit extension on iOS. However, Apple has indicated that native Watch OS development is in the pipeline for later in 2015, which suggests that iteration and powerful improvements for Apple Watch are on their way. For now, developers can use Apple Watch and Watch OS as peripherals for their larger iOS application experiences, but their opportunities are sure to expand as the Apple Watch and its operating system mature and grow more powerful.

Watch apps can optionally offer glances

Developers have three opportunities to bring their iOS apps to Apple Watch: Watch app interfaces, and optional additions glances and actionable notifications. These three interface views interact with one another in a few different ways, and together form a cohesive Watch app experience for Apple Watch users. The Watch app UI is made up of series of predefined images, and developers can determine their sequence to emulate animations. (Third-party apps are allotted 20 megabytes for image caching before they actually need it.)

But Watch apps are just the beginning of the story. Developers can also build glances, a new interface mode that users can access by swiping up from the watch face on Apple Watch. Glances are template-based interfaces, and developers can choose from a variety of layouts to display different types of information. When a user taps on a glance, Apple Watch launches its complementary Watch app. Developers can deep-link to content within their Watch app with the new Handoff API included in iOS 8 (They can also pass tasks and users between Watch apps and iOS apps using the same API.)

Apple Watch plays nice with interactive notifications

iOS 8 introduced new interactive notifications that would allow users to quickly dismiss or take action with the various notification messages that pop into their Notification Center. For example, users can delete emails or reply to text messages without having to open those respective apps. Because Apple Watch supports any interactive iOS notifications out of the box, developers of iOS applications that support actionable notifications have zero additional work to get their notifications working on Apple Watch. But for those who invest time on their Watch app, there are opportunities on Watch OS to make immersive and useful notification experiences.

Using the new WKUserNotificationInterfaceController included in the WatchKit framework, developers can customize the appearance of the notifications their apps deliver. Apple Watch includes two types of notifications: “short look” notifications that appear by default, displaying an app icon and brief title and description, and “long look” notifications that expand when users raise their wrists for a moment. The long look notification type can display a custom interface with images, a custom color “sash” at the top that includes the app icon and name, and additional information. With these tools, developers can begin building immersive and fully interactive notification experiences right on users’ wrists.

Like glances, notifications take advantage of the Handoff API to deep link into both Watch apps and iOS counterpart apps. In addition, Apple’s WatchKit developer documentation mentions that Watch apps can also include a Settings bundle, much like iOS apps do for custom preferences and toggles that appear in the iOS Settings app. These Watch app Settings bundles are specified to appear in a previously unannounced Apple Watch app on iPhone, which implies that the iOS 8.2 SDK developer beta, which supports WatchKit, is still very much a work in progress.

Apple Watch could come in even more sizes

Diagram comparing the 38mm and 42mm Apple Watch models, with screen resolutions of 340 by 272 pixels and 390 by 312 pixels respectively

Perhaps the most illuminative insight from the WatchKit developer documentation was the implication that Watch OS is optimized for all kinds of different screen sizes, dimensions, and resolutions. The first-generation Apple Watch that is slated for next spring comes in two sizes, a 38-millimeter and 42-millimeter, and two resolutions, 340x272 and 390x312, respectively. But interface controllers included in the WatchKit framework will allow developers to build an interface schema that scales elegantly onto both existing Apple Watch form factors, and theoretically could support future additions.

New controllers like WKInterfaceGroup and WKInterfaceTable allow developers to build lists and tables of icons and labels that fill adaptively from the top-left corner of the Apple Watch display, meaning developers can start with interface design tools that just work on multiple resolutions. In addition, the WKInterfaceMap controller allows for the inclusion of static maps interfaces that link to the Maps app on Watch OS, and a WKInterfaceDevice controller that identifies device-specific information like display size.

These tools imply that the Apple Watch product family could grow to support additional sizes, resolutions, and perhaps even shapes. This documentation helps quantify different components of the Apple Watch experience that have only been seen in marketing trailers, and help both developers and potential users understand what the anticipated wearable is going to offer. Apple Watch represents an absolutely massive opportunity for iOS developers to tap into iOS’s innovation-hungry user base. The specifics of the development approach are interesting, and position Apple Watch uniquely versus more powerful Android Wear and Samsung Tizen smartwatches. With nearly every major technology player outlining their vision for wearables, 2015 promises to be an interesting year for the wrist.