TechnologiesUI & App Frameworks

ClockKit

iOSmacOStvOSwatchOSvisionOS

ClockKit builds watchOS complications that display app information directly on the watch face. You define a data source that supplies timeline entries to the CLKComplicationServer, describing each complication with a CLKComplicationDescriptor and rendering its content with a CLKComplicationTemplate. The framework provides templates for every complication family and slot, including modular, utilitarian, circular, extra-large, and graphic styles such as CLKComplicationTemplateModularSmallSimpleText and CLKComplicationTemplateGraphicCornerGaugeText. Migration configuration types like CLKComplicationStaticWidgetMigrationConfiguration and CLKComplicationIntentWidgetMigrationConfiguration help move existing complications to widget-based equivalents.

Essentials 5

The core objects that register a complication, supply its data, and describe it to the system.

  • Cl
    CLKComplicationwatchOS 9.0+
    An object that represents a single complication on the watch face, identified by its family and identifier.
  • Cl
    CLKComplicationServerwatchOS 9.0+
    The central object that manages complication timelines and requests data updates from your data source.
  • Cl
    CLKComplicationDescriptorwatchOS 7.0+
    An object that describes a complication your app supports, including its identifier, display name, and supported families.
  • En
    CLKComplicationFamilywatchOS 2.0+
    Constants that identify the complication families a watch face slot can display.
  • Cl
    CLKWatchFaceLibrarywatchOS 7.0+
    An object that adds shared watch faces to the user's collection from a face file.

Timeline Data 4

Types that schedule complication content over time and control how the system reveals it.

  • Cl
    CLKComplicationTimelineEntrywatchOS 9.0+
    An object that pairs a complication template with the date at which it should appear on the watch face.
  • St
    CLKComplicationTimeTravelDirectionswatchOS 9.0+
    Constants that indicate the directions in time a complication's timeline supports.
  • En
    CLKComplicationTimelineAnimationBehaviorwatchOS 9.0+
    Constants that specify how the system animates transitions between timeline entries.
  • En
    CLKComplicationPrivacyBehaviorwatchOS 9.0+
    Constants that specify whether a complication hides its data when the device is locked.

Templates 1

The base class for all complication layouts that lay out text, images, and gauges within a slot.

  • Cl
    CLKComplicationTemplatewatchOS 9.0+
    The abstract base class for all complication templates that arrange a slot's text, images, and gauges.

Modular Templates 11

Templates for the modular small and modular large complication families.

  • Cl
    CLKComplicationTemplateModularSmallSimpleTextwatchOS 9.0+
    A modular small template that displays a single line of text.
  • Cl
    CLKComplicationTemplateModularSmallSimpleImagewatchOS 9.0+
    A modular small template that displays a single image.
  • Cl
    CLKComplicationTemplateModularSmallRingTextwatchOS 9.0+
    A modular small template that displays text inside a circular ring gauge.
  • Cl
    CLKComplicationTemplateModularSmallRingImagewatchOS 9.0+
    A modular small template that displays an image inside a circular ring gauge.
  • Cl
    CLKComplicationTemplateModularSmallStackTextwatchOS 9.0+
    A modular small template that stacks two lines of text vertically.
  • Cl
    CLKComplicationTemplateModularSmallStackImagewatchOS 9.0+
    A modular small template that stacks an image above a line of text.
  • Cl
    CLKComplicationTemplateModularSmallColumnsTextwatchOS 9.0+
    A modular small template that arranges text into two columns and two rows.
  • Cl
    CLKComplicationTemplateModularLargeStandardBodywatchOS 9.0+
    A modular large template that displays a header line above two body lines.
  • Cl
    CLKComplicationTemplateModularLargeTallBodywatchOS 9.0+
    A modular large template that displays a header above a single tall body line.
  • Cl
    CLKComplicationTemplateModularLargeTablewatchOS 9.0+
    A modular large template that arranges a header above a two-column, two-row table.
  • Cl
    CLKComplicationTemplateModularLargeColumnswatchOS 9.0+
    A modular large template that arranges text into two columns and three rows.

Utilitarian Templates 5

Templates for the utilitarian small and utilitarian large complication families.

  • Cl
    CLKComplicationTemplateUtilitarianSmallSquarewatchOS 9.0+
    A utilitarian small template that displays a single square image.
  • Cl
    CLKComplicationTemplateUtilitarianSmallRingTextwatchOS 9.0+
    A utilitarian small template that displays text inside a ring gauge.
  • Cl
    CLKComplicationTemplateUtilitarianSmallRingImagewatchOS 9.0+
    A utilitarian small template that displays an image inside a ring gauge.
  • Cl
    CLKComplicationTemplateUtilitarianSmallFlatwatchOS 9.0+
    A utilitarian small template that displays an optional image alongside a line of text.
  • Cl
    CLKComplicationTemplateUtilitarianLargeFlatwatchOS 9.0+
    A utilitarian large template that displays an optional image alongside a single wide line of text.

Circular and Extra-Large Templates 13

Templates for the circular small and extra-large complication families.

  • Cl
    CLKComplicationTemplateCircularSmallSimpleTextwatchOS 9.0+
    A circular small template that displays a single line of text.
  • Cl
    CLKComplicationTemplateCircularSmallSimpleImagewatchOS 9.0+
    A circular small template that displays a single image.
  • Cl
    CLKComplicationTemplateCircularSmallRingTextwatchOS 9.0+
    A circular small template that displays text inside a ring gauge.
  • Cl
    CLKComplicationTemplateCircularSmallRingImagewatchOS 9.0+
    A circular small template that displays an image inside a ring gauge.
  • Cl
    CLKComplicationTemplateCircularSmallStackTextwatchOS 9.0+
    A circular small template that stacks two lines of text vertically.
  • Cl
    CLKComplicationTemplateCircularSmallStackImagewatchOS 9.0+
    A circular small template that stacks an image above a line of text.
  • Cl
    CLKComplicationTemplateExtraLargeSimpleTextwatchOS 9.0+
    An extra-large template that displays a single line of text.
  • Cl
    CLKComplicationTemplateExtraLargeSimpleImagewatchOS 9.0+
    An extra-large template that displays a single image.
  • Cl
    CLKComplicationTemplateExtraLargeRingTextwatchOS 9.0+
    An extra-large template that displays text inside a ring gauge.
  • Cl
    CLKComplicationTemplateExtraLargeRingImagewatchOS 9.0+
    An extra-large template that displays an image inside a ring gauge.
  • Cl
    CLKComplicationTemplateExtraLargeStackTextwatchOS 9.0+
    An extra-large template that stacks two lines of text vertically.
  • Cl
    CLKComplicationTemplateExtraLargeStackImagewatchOS 9.0+
    An extra-large template that stacks an image above a line of text.
  • Cl
    CLKComplicationTemplateExtraLargeColumnsTextwatchOS 9.0+
    An extra-large template that arranges text into two columns and two rows.

Graphic Corner and Circular Templates 15

Full-color graphic templates for the corner and circular complication slots.

  • Cl
    CLKComplicationTemplateGraphicCornerGaugeTextwatchOS 9.0+
    A graphic corner template that displays text alongside a gauge.
  • Cl
    CLKComplicationTemplateGraphicCornerGaugeImagewatchOS 9.0+
    A graphic corner template that displays an image alongside a gauge.
  • Cl
    CLKComplicationTemplateGraphicCornerTextImagewatchOS 9.0+
    A graphic corner template that displays text alongside a full-color image.
  • Cl
    CLKComplicationTemplateGraphicCornerStackTextwatchOS 9.0+
    A graphic corner template that stacks two lines of text in the corner.
  • Cl
    CLKComplicationTemplateGraphicCornerCircularImagewatchOS 9.0+
    A graphic corner template that displays a full-color circular image.
  • Cl
    CLKComplicationTemplateGraphicCircularwatchOS 9.0+
    A graphic circular template that displays text and an optional gauge in a circular slot.
  • Cl
    CLKComplicationTemplateGraphicCircularImagewatchOS 9.0+
    A graphic circular template that displays a full-color circular image.
  • Cl
    CLKComplicationTemplateGraphicCircularOpenGaugeRangeTextwatchOS 9.0+
    A graphic circular template with an open gauge framed by leading and trailing range text.
  • Cl
    CLKComplicationTemplateGraphicCircularOpenGaugeSimpleTextwatchOS 9.0+
    A graphic circular template with an open gauge and a single line of center text.
  • Cl
    CLKComplicationTemplateGraphicCircularOpenGaugeImagewatchOS 9.0+
    A graphic circular template with an open gauge and a center image.
  • Cl
    CLKComplicationTemplateGraphicCircularClosedGaugeTextwatchOS 9.0+
    A graphic circular template with a closed gauge and a single line of center text.
  • Cl
    CLKComplicationTemplateGraphicCircularClosedGaugeImagewatchOS 9.0+
    A graphic circular template with a closed gauge and a center image.
  • Cl
    CLKComplicationTemplateGraphicCircularStackTextwatchOS 9.0+
    A graphic circular template that stacks two lines of text vertically.
  • Cl
    CLKComplicationTemplateGraphicCircularStackImagewatchOS 9.0+
    A graphic circular template that stacks an image above a line of text.
  • Cl
    CLKComplicationTemplateGraphicBezelCircularTextwatchOS 9.0+
    A graphic bezel template that wraps text around a circular complication.

Graphic Rectangular and Extra-Large Templates 13

Full-color graphic templates for the rectangular and extra-large circular complication slots.

  • Cl
    CLKComplicationTemplateGraphicRectangularFullImagewatchOS 9.0+
    A graphic rectangular template that fills its slot with a single full-color image.
  • Cl
    CLKComplicationTemplateGraphicRectangularLargeImagewatchOS 9.0+
    A graphic rectangular template that displays a header line above a large full-color image.
  • Cl
    CLKComplicationTemplateGraphicRectangularStandardBodywatchOS 9.0+
    A graphic rectangular template that displays a header line above two body lines.
  • Cl
    CLKComplicationTemplateGraphicRectangularTextGaugewatchOS 9.0+
    A graphic rectangular template that displays a header and body line alongside a gauge.
  • Cl
    CLKComplicationTemplateGraphicExtraLargeCircularwatchOS 9.0+
    A graphic extra-large circular template that displays text and an optional gauge.
  • Cl
    CLKComplicationTemplateGraphicExtraLargeCircularImagewatchOS 9.0+
    A graphic extra-large circular template that displays a full-color image.
  • Cl
    CLKComplicationTemplateGraphicExtraLargeCircularOpenGaugeRangeTextwatchOS 9.0+
    A graphic extra-large circular template with an open gauge framed by range text.
  • Cl
    CLKComplicationTemplateGraphicExtraLargeCircularOpenGaugeSimpleTextwatchOS 9.0+
    A graphic extra-large circular template with an open gauge and a single line of center text.
  • Cl
    CLKComplicationTemplateGraphicExtraLargeCircularOpenGaugeImagewatchOS 9.0+
    A graphic extra-large circular template with an open gauge and a center image.
  • Cl
    CLKComplicationTemplateGraphicExtraLargeCircularClosedGaugeTextwatchOS 9.0+
    A graphic extra-large circular template with a closed gauge and a single line of center text.
  • Cl
    CLKComplicationTemplateGraphicExtraLargeCircularClosedGaugeImagewatchOS 9.0+
    A graphic extra-large circular template with a closed gauge and a center image.
  • Cl
    CLKComplicationTemplateGraphicExtraLargeCircularStackTextwatchOS 9.0+
    A graphic extra-large circular template that stacks two lines of text vertically.
  • Cl
    CLKComplicationTemplateGraphicExtraLargeCircularStackImagewatchOS 9.0+
    A graphic extra-large circular template that stacks an image above a line of text.

SwiftUI View Templates 15

Templates that render their content from a SwiftUI view for graphic complication slots.

  • Cl
    CLKComplicationTemplateGraphicCircularClosedGaugeView
    A graphic circular template that renders a SwiftUI view inside a closed gauge.
  • Cl
    CLKComplicationTemplateGraphicCircularOpenGaugeView
    A graphic circular template that renders a SwiftUI view inside an open gauge.
  • Cl
    CLKComplicationTemplateGraphicCircularStackViewText
    A graphic circular template that stacks a SwiftUI view above a line of text.
  • Cl
    CLKComplicationTemplateGraphicCircularView
    A graphic circular template that renders its content from a SwiftUI view.
  • Cl
    CLKComplicationTemplateGraphicCornerCircularView
    A graphic corner template that renders a circular SwiftUI view.
  • Cl
    CLKComplicationTemplateGraphicCornerGaugeView
    A graphic corner template that renders a SwiftUI view alongside a gauge.
  • Cl
    CLKComplicationTemplateGraphicCornerTextView
    A graphic corner template that renders a SwiftUI view alongside text.
  • Cl
    CLKComplicationTemplateGraphicExtraLargeCircularClosedGaugeView
    A graphic extra-large circular template that renders a SwiftUI view inside a closed gauge.
  • Cl
    CLKComplicationTemplateGraphicExtraLargeCircularOpenGaugeView
    A graphic extra-large circular template that renders a SwiftUI view inside an open gauge.
  • Cl
    CLKComplicationTemplateGraphicExtraLargeCircularStackViewText
    A graphic extra-large circular template that stacks a SwiftUI view above a line of text.
  • Cl
    CLKComplicationTemplateGraphicExtraLargeCircularView
    A graphic extra-large circular template that renders its content from a SwiftUI view.
  • Cl
    CLKComplicationTemplateGraphicRectangularFullView
    A graphic rectangular template that fills its slot with a SwiftUI view.
  • Cl
    CLKComplicationTemplateGraphicRectangularLargeView
    A graphic rectangular template that displays a header above a large SwiftUI view.
  • Cl
    CLKComplicationTemplateGraphicRectangularStandardBodyView
    A graphic rectangular template that displays a header and body text alongside a SwiftUI view.
  • Cl
    CLKComplicationTemplateGraphicRectangularTextGaugeView
    A graphic rectangular template that displays text alongside a SwiftUI gauge view.

Content Providers 11

Objects that supply the text, images, and gauges a template displays.

  • Cl
    CLKTextProviderwatchOS 9.0+
    The abstract base class for objects that supply formatted text to a complication template.
  • Cl
    CLKSimpleTextProviderwatchOS 9.0+
    A text provider that supplies a static string and optional short-text fallback.
  • Cl
    CLKDateTextProviderwatchOS 9.0+
    A text provider that formats a date using the specified calendar units.
  • Cl
    CLKTimeTextProviderwatchOS 9.0+
    A text provider that formats the time-of-day portion of a date.
  • Cl
    CLKTimeIntervalTextProviderwatchOS 9.0+
    A text provider that formats the span between two dates as a time interval.
  • Cl
    CLKRelativeDateTextProviderwatchOS 9.0+
    A text provider that formats a date relative to the current time, updating automatically.
  • Cl
    CLKImageProviderwatchOS 9.0+
    An object that supplies a one- or two-piece tinted image to a complication template.
  • Cl
    CLKFullColorImageProviderwatchOS 9.0+
    An object that supplies a full-color image to graphic complication templates.
  • Cl
    CLKGaugeProviderwatchOS 9.0+
    The abstract base class for objects that supply a gauge's fill level and colors to a template.
  • Cl
    CLKSimpleGaugeProviderwatchOS 9.0+
    A gauge provider that supplies a fill fraction and colors from explicit values.
  • Cl
    CLKTimeIntervalGaugeProviderwatchOS 9.0+
    A gauge provider that derives its fill level from the progress of a time interval.

Layout Options 5

Enumerations that configure how text, rings, and gauges appear within a template.

  • En
    CLKComplicationColumnAlignmentwatchOS 9.0+
    Constants that specify the horizontal alignment of text within a column-based template.
  • En
    CLKComplicationRingStylewatchOS 9.0+
    Constants that specify whether a ring gauge appears open or closed.
  • En
    CLKGaugeProviderStylewatchOS 9.0+
    Constants that specify whether a gauge is drawn as a fill or a single indicator.
  • En
    CLKRelativeDateStylewatchOS 9.0+
    Constants that specify how a relative-date text provider formats its output.
  • En
    ComplicationRenderingMode
    Constants that specify whether a complication renders in full color or as a tinted template.

Widget Migration 5

Configuration types and protocol that migrate existing complications to widget-based equivalents.

  • Pr
    CLKComplicationWidgetMigratorwatchOS 9.0+
    A protocol your app adopts to provide configurations that migrate complications to widgets.
  • Cl
    CLKComplicationWidgetMigrationConfigurationwatchOS 9.0+
    Common class for different kinds of mappings to Widget configurations.
  • Cl
    CLKComplicationStaticWidgetMigrationConfigurationwatchOS 9.0+
    Holds data that maps to a Widget specified by a `StaticConfiguration` in a specific extension.
  • Cl
    CLKComplicationIntentWidgetMigrationConfigurationwatchOS 9.0+
    Holds data that maps to a Widget specified by an `IntentConfiguration` in a specific extension.
  • Cl
    CLKComplicationAppIntentWidgetMigrationConfiguration
    A configuration that migrates an App Intent-based complication to a widget equivalent.

Protocols 1

  • Pr
    CLKComplicationDataSourcewatchOS 2.0+

Extends 3

NSNotificationEnvironmentValuesView
← UI & App Frameworks