These are the days where watches are no more just for seeing the date/time. We see them turning smarter with all new tech. We have already seen the Android smart watches and time has come for a new King in making. All must have heard the new craze in market – The Apple Watch – looks stunning doesn’t it!! Budding developers must be enthusiastic to try out their idea on the new craze. Before we jump into building apps for the watch, lets have an introduction to WatchKit (the SDK used to build the apps) and also lets get an idea of how the SDK works and what it is capable of.
Architecture of WatchKit
The first step is to understand the basic architecture of WatchKit. Refer to the diagram below to know how the WatchKit App and WatchKit extension communicate-
All the interactions between app and WatchKit extension happens in the background. As seen in the representation above, we see that there is a two-way communication between WatchKit App and WatchKit extension. The WatchKit App comes bundled when you install an App on your iPhone. When installing an iOS app, the system looks if there is a paired Apple Watch present and accordingly prompts to install the app on watch.
These are the apps that can be launched by users and are visible on the home screen of the Apple Watch. To create a Watch compatible app, you will need two separate entities – WatchKit App (the one that runs on Apple Watch) and WatchKit extension (implements actions and runs on the paired iPhone).
A WatchKit app is a simple combination of storyboards and the resource files associated with the App’s UI. However, WatchKit extension forms the brain of the setup, houses the code for the WatchKit App’s UI and its interactions.
We have three terminologies to understand clearly in order to know what new the WatchKit brings to the table.
WatchKit Apps –
These can be considered like any other apps we have seen or used till date. Users may launch, interact with the app and control it also. The only difference is that the WatchKit Apps run on Apple Watch!
As the name suggests, this feature allows us to provide the user with a quick glance of our app. It is just read only information and there is no user interaction based behavior in this.
Glances cannot be scrolled; hence it expects you to provide the entire read only info you want to on a single screen. However, a tap on glance generally launches the corresponding WatchKit app.
Actionable Notifications –
These are the notifications that pop on your watch (both local and remote notifications). The users can take various actions as desired by interacting with the Apple Watch itself!
We can customize the interface, graphics used or the data to be displayed as needed. We can add meaningful UI components (e.g., buttons) to the actionable notifications based on need. E.g., A meeting invite can be an actionable notification with “Accept” and “Reject” buttons. It is up to the developer to implement the corresponding action that needs to be carried out. This implementation is done in the corresponding WatchKit extension.