WatchKit Namespace

Framework for programming the Apple Watch.

Remarks

Watch Kit is Apple's framework for programming the Apple Watch. Watch Kit solutions are comprised of 3 Xamarin projects:

ProjectPurpose
Parent App The Parent App is a normal iPhone project that bundles the other projects and can be used for tutorials, administrative needs, and background processing. It runs in a separate sandbox than the Watch Extension and it is possible for the user to run the Watch App / Extension without ever opening the Parent App.
Watch Extension The Watch Extension runs on a connected iPhone and holds the program logic for the Watch App itself.
Watch App The Watch App is a small project that runs on the phone itself. Generally, the Watch App only consists of a Storyboard file, small resources, and links to files in the Watch Extension.

Installation, structure, and general programming information about Watch Kit can be found in Xamarin's Watch Kit Programming Guide.

Programming Watch Extensions is heavily based on reacting to lifecycle methods of the WatchKit.WKInterfaceController. Application developers create subtypes of WatchKit.WKInterfaceController and override the WatchKit.WKInterfaceController.Awake, WatchKit.WKInterfaceController.WillActivate, and WatchKit.WKInterfaceController.DidDeactivate methods.

Classes

TypeReason
WKAccessibilityExtension methods for WatchKit.WKInterfaceController that improve accessibility.
WKAccessibilityImageRegionA portion of an image that should be made separately available to assistive applications.
WKErrorCodeEnumerates error codes relevant to Watch Kit programming.
WKInterfaceButtonA watch control that acts as a button.
WKInterfaceControllerBase class for controller objects in Watch Extension projects.
WKInterfaceDateA watch control that displays the date and time.
WKInterfaceDeviceRepresents the watch. Use the singleton object WatchKit.WKInterfaceDevice.CurrentDevice.
WKInterfaceGroupA container for watch controls.
WKInterfaceImageA watch control that displays an image.
WKInterfaceLabelA watch control that displays text.
WKInterfaceMapA watch control that displays an Apple-provided map.
WKInterfaceMapPinColorEnumeration of colors that can be used by pins on a WatchKit.WKInterfaceMap.
WKInterfaceObjectBase class for Watch controls.
WKInterfaceSeparatorA watch control that displays a line for separating controls.
WKInterfaceSliderA watch control that allows the user to set a value within a range.
WKInterfaceSwitchA watch control that allows the user to manipulate a binary value.
WKInterfaceTableA watch control that provides a single-column table.
WKInterfaceTimerA watch control that displays a countdown timer.
WKMenuItemIconEnumerates standard icons for use in Watch apps.
WKTextInputModeEnumeration of restrictions on text input (constraints on emoji).
WKUserNotificationInterfaceControllerA sub-class of WatchKit.WKInterfaceController that adds methods that are called when a notification arrives.
WKUserNotificationInterfaceTypeEnumerates notificaion types for use with the WatchKit.WKUserNotificationInterfaceController.DidReceiveLocalNotification and WatchKit.WKUserNotificationInterfaceController.DidReceiveRemoteNotification completion handlers.