Framework

ClockKit

Display app-specific data in the complications on the clock face.

Overview

Use the ClockKit framework to implement a complication interface for your app. Complications are small interface elements that appear on the clock face and provide quick access to frequently used data. Apps provide data in advance of when it is needed and specify how they want the data displayed. The system updates the appearance of your complication at the time you specify.

Because you specify complication data in advance, you use templates to tell the system how you want that data displayed. ClockKit provides templates for each complication size and style that can be displayed on the clock face. Templates let you arrange text and images. There are also templates for displaying completion rings and other types of formatted content.

Topics

Essentials

Your data source object provides templates filled with app-specific data that ClockKit uses to display complications on the watch face.

Adding a Complication to Your watchOS App

Build a better watchOS experience using complications.

CLKComplicationDataSource

A protocol that communicates with ClockKit, providing information about your complication.

Management

Manage your complications when they are active on the watch face, and use timeline entries to specify the data that you want to display.

CLKComplicationServer

An object that manages the active complications for a given app.

CLKComplication

Metadata about one of your custom complications.

CLKComplicationTimelineEntry

A container for the complication template object to display and the time at which to display it.

Data Providers

Data providers manage the data you display in a complication, ensuring that it is accurate at the time it is displayed.

CLKDateTextProvider

A formatted string that conveys a date without any time information.

CLKImageProvider

An image displayed by a complication.

CLKFullColorImageProvider

A full-color image displayed by a complication.

CLKRelativeDateTextProvider

A formatted string that conveys the difference in time between the current date and a date that you specify.

CLKSimpleTextProvider

A single line of text to display in your complication interface.

CLKTextProvider

The common behavior for displaying text-based data in a complication.

CLKTimeIntervalTextProvider

A formatted time range.

CLKTimeTextProvider

A formatted time value.

CLKSimpleGaugeProvider

A gauge that shows a fractional value.

CLKTimeIntervalGaugeProvider

A gauge that tracks time intervals.

CLKGaugeProvider

An abstract superclass that provides all the common behaviors for the gauge providers.

CLKSimpleGaugeProviderFillFractionEmpty

A fill value indicating an empty gauge.

CLKGaugeProviderStyle

Visual styles available for gauges.

Templates

Draw complications using templates that define the layout and appearance of the data from the timeline. Each complication family offers a variety of templates for displaying your data.

Circular Small

Use circular small templates to display content in the corners of the Color watch face.

Extra Large

Use the extra large templates to display content on the X-Large watch faces.

Modular Small

Use modular small templates to display content in the smaller spaces of the Modular watch face.

Modular Large

Use modular large templates to display multiple rows of content on the Modular watch face.

Utilitarian

Use the utilitarian templates to display content in the Utility, Motion, Mickey Mouse, and Minnie Mouse watch faces.

Graphic

Use graphic templates to display visually rich content in the Infograph and Infograph Modular clock faces.

CLKComplicationTemplate

An abstract class that defines the base behavior for all templates.

CLKComplicationFamily

Constants indicating the template groups.

property list key CLKComplicationSupportedFamilies

The complication families for which the app can provide data.

Name: ClockKit Complication - Supported Families