Today the first batch of Apple Watches should start shipping to those lucky few. So I thought it would be nice to have an overview of WatchKit, the development platform from Apple that allows you to build Apps for the Apple Watch.
So as it stands at the moment, true native apps cannot be built for the Apple Watch. These have been promised for sometime in 2015, and it may be that we will see the first sign of these at this year’s WWDC.
Instead apps you build heavily rely on the iPhone paired with the watch.
Any app you build essentially has two halves.
- One-half lives on the Apple Watch. This is your WatchKit App. This app handles the user interface, any user interaction but very importantly – does not run any code. In fact, you could say the Apple Watch behaves like a second screen to the iPhone
- The other half is a WatchKit extension that lives in the corresponding iPhone app. It’s this app that runs all of your code. It’s responsible for deciding what to display on the Apple Watch, what actions to perform when the user interacts with the Apple Watch, etc.
What’s clever about this setup is that when you design your app in Xcode, you design the Apple Watch screens as you would any local iPhone screen. When the app is then running, WatchKit automatically handles all the communication between the two devices over Bluetooth.
Your app on the Apple Watch contains a full user interface. Users can launch, control, and interact with your app in ways unique to Apple Watch.
Apple supply quite a few controls that allow you to build up your user interface including:
- Date and Timers
Apple has also simplified the way you lay out your user interface. With iPhone apps, we have a system called AutoLayout that allows us to design complex screens that will scale to any device size. For the Apple Watch, Apple has simplified things by introducing groups.
Groups are a container for other elements such as your labels and button. They give you the option to arrange elements in the group horizontally as well as vertically.
Glances and Notifications
As well as building Apps that users can interact with, Apple has supplied two other methods of presenting information to the Apple Watch user.
A glance is a supplemental way for the user to view important information from your app. A glance immediately provides relevant information in a timely manner. For example, the glance for a calendar app might show information about the user’s next meeting. Glances do not support interactivity.
By default, any notifications received by the iPhone will also be presented to the Watch. The Watch uses a minimal interface to display incoming notifications. When the user’s movement indicates a desire to see more information, the minimal interface changes to a more detailed interface displaying the contents of the notification.
All in all Apple has provided some great APIs to kick start Apple Watch development, and when we get the SDK for native apps later on this year things can only get better.
If you are interested in learning how to develop Apps for iOS and the Apple Watch then check out our range of Apple Watch Development courses here