WatchKit was first released in 2014, one year before the release of the Apple Watch.[2] It was bundled in with the iOS 8.2 beta SDK.[3] In 2015, Apple set up WatchKit labs in several different cities to allow for in-person development of Apple Watch applications before the product's official launch.[4]
Functionality
WatchKit provides classes allows for development of applications on the Apple Watch. WatchKit also enables iOS applications to send notifications and "Glances," which are persistent notifications that are created using predefined templates made by Apple.[5] The framework is designed to be used with either Swift or Objective-C, and must be compiled in Xcode. While it is designed for the Apple Watch, the watch itself only renders the user interface, and an iPhone linked with the watch renders everything else. It also allows for Handoff support with the linked iPhone.[6]
Classes
WatchKit provides some classes for general purposes, as representing controllers, interfaces, and alert actions.[7]
WKAccessibilityImageRegion
WKAlertAction
WKExtension
WKImage
WKInterfaceController
WKUserNotificationInterfaceController
WKInterfaceDevice
WKPickerItem
Also provides support for file management, through the following classes:
WKAudioFileAsset
WKAudioFilePlayer
WKAudioFileQueuePlayer
WKAudioFilePlayerItem
And a set of classes that inherit from WKInterfaceObject and represents visual UI elements.
WKInterfaceButton
WKInterfaceDate
WKInterfaceGroup
WKInterfaceImage
WKInterfaceLabel
WKInterfaceMap
WKInterfaceMovie
WKInterfacePicker
WKInterfaceSeparator
WKInterfaceSlider
WKInterfaceSwitch
WKInterfaceTable
WKInterfaceTimer
Protocols
WatchKit provides two protocols: WKExtensionDelegate and WKImageAnimatable. WKExtensionDelegate is intended to manage the behavior of the WatchKit extension and WKImageAnimatable controls the playback of animated images.