Contents

CLKComplication

Metadata about a custom complication.

Declaration

class CLKComplication

Mentioned in

Overview

ClockKit defines each complication by its family and identifier properties. Each pair represents a unique complication that the user can select when configuring a watch face. When creating timeline entries, check both properties before creating and filling the complication’s template.

You specify the possible family and identifier combinations in your data source’s getComplicationDescriptors(handler:) method. Each of the CLKComplicationDescriptor objects you provide defines a unique identifier and the families that it supports.

In watchOS 6 and earlier, each app can have only one complication per supported family. When your app creates complication templates, determine the complication’s type from its family property only. For more information, see Declaring complications for your app.

You don’t create instances of this class directly. Instead, you retrieve them from the CLKComplicationServer object. Complication objects are only available when your complication is in use on the watch face.

In addition to getting information about the complication, you use complication objects to extend or replace the timeline data for one of your active complications. When calling the extendTimeline(for:) and reloadTimeline(for:) methods of the shared CLKComplicationServer object, pass the complication object you want to update.

Topics

Accessing Data About the Complication

See Also

Other Symbols