### Initialize Session and Schedule Download Task Source: https://developer.apple.com/documentation/clockkit/keeping-your-complications-up-to-date Create the URL session and schedule a download task with an earliest start date. ```swift let urlSession = URLSession(configuration: config, delegate: self, delegateQueue: nil) let backgroundTask = urlSession.downloadTask(with: url) backgroundTask.earliestBeginDate = Date().addingTimeInterval(15 * 60) ``` -------------------------------- ### Deprecated Initializer: init(start:end:) Source: https://developer.apple.com/documentation/clockkit/clktimeintervaltextprovider/init%28start%3Aend%3A%29 This initializer is deprecated and should not be used in new development. It creates a text provider for a time interval using start and end dates. ```APIDOC ## init(start:end:) ### Description Creates and returns a text provider with the specified start and end dates. ### Method Convenience Initializer ### Endpoint N/A (Initializer) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) N/A (Initializer) #### Response Example None ### Deprecated This initializer is deprecated and will be removed in a future version. Use `init(start:end:timeZone:)` instead. ``` -------------------------------- ### Initialize CLKTimeIntervalTextProvider with start and end dates Source: https://developer.apple.com/documentation/clockkit/clktimeintervaltextprovider/init%28start%3Aend%3A%29 Creates a text provider for a time range. This initializer is deprecated and requires non-nil start and end dates. ```swift convenience init( start startDate: Date, end endDate: Date ) ``` -------------------------------- ### Implement getWidgetConfiguration Source: https://developer.apple.com/documentation/clockkit/clkcomplicationwidgetmigrator/getwidgetconfiguration%28from%3Acompletionhandler%3A%29 An example implementation that maps complication identifiers to specific static widget migration configurations. ```swift func getWidgetConfiguration(from complicationDescriptor: CLKComplicationDescriptor, completionHandler: @escaping (CLKComplicationWidgetMigrationConfiguration?) -> Void) { var configuration: CLKComplicationWidgetMigrationConfiguration? = nil switch complicationDescriptor.identifier { case caffeineDoseIdentifier: configuration = CLKComplicationStaticWidgetMigrationConfiguration( kind: "Caffeine_Complications", extensionBundleIdentifier: "com.example.apple-samplecode.Coffee-Tracker.watchkitapp.watchkitextension.CoffeeTracker-Complications") case cupTotalIdentifier: configuration = CLKComplicationStaticWidgetMigrationConfiguration( kind: "CupTotal_Complications", extensionBundleIdentifier: "com.example.apple-samplecode.Coffee-Tracker.watchkitapp.watchkitextension.CoffeeTracker-Complications") case cupAndCaffeineIdentifier: configuration = CLKComplicationStaticWidgetMigrationConfiguration( kind: "CupAndCaffeine_Complications", extensionBundleIdentifier: "com.example.apple-samplecode.Coffee-Tracker.watchkitapp.watchkitextension.CoffeeTracker-Complications") default: configuration = nil } completionHandler(configuration) } ``` -------------------------------- ### Resume Background Download Task Source: https://developer.apple.com/documentation/clockkit/keeping-your-complications-up-to-date Start the scheduled download task. ```swift backgroundTask.resume() ``` -------------------------------- ### init(format:_:) Initializer Source: https://developer.apple.com/documentation/clockkit/clktextprovider/init%28format%3A_%3A%29 Creates and returns a text provider built from the specified format string and arguments. ```APIDOC ## init(format:_:) ### Description Creates and returns a text provider built from the specified format string. This method is deprecated as of watchOS 6.0. ### Parameters - **format** (String) - Required - A format string to use when building the text provider. Use the %@ placeholder to insert content from another text provider. - **args** (any CVarArg...) - Required - A comma-separated list of arguments to substitute into the format string. ### Return Value A text provider object built from the specified arguments. ### Discussion Use this method to create a text provider comprising text and the content of other objects, including other text providers. ``` -------------------------------- ### Getting the Time Information Source: https://developer.apple.com/documentation/clockkit/clktimeintervaltextprovider Accesses the start date, end date, and time zone information used by the text provider. ```APIDOC ### Getting the Time Information `var startDate: Date` The start date for the time interval. `var endDate: Date` The end date for the time interval. `var timeZone: TimeZone?` The time zone used to format time values. ``` -------------------------------- ### Get Earliest Timeline Start Date - ClockKit Source: https://developer.apple.com/documentation/clockkit/clkcomplicationdatasource/gettimelinestartdate%28for%3Awithhandler%3A%29 Implement this method to specify the earliest date for which your complication can supply timeline entries. If Time Travel is not supported, specify the current date. If not implemented, ClockKit won't retrieve past data. ```swift optional func getTimelineStartDate( for complication: CLKComplication, withHandler handler: @escaping (Date?) -> Void ) ``` -------------------------------- ### init(content:textProvider:) Source: https://developer.apple.com/documentation/clockkit/clkcomplicationtemplategraphicextralargecircularstackviewtext/init%28content%3Atextprovider%3A%29 Initializes a template that displays a SwiftUI view alongside a text provider. ```APIDOC ## init(content:textProvider:) ### Description Creates a template that has a view and a small amount of text. This initializer is deprecated. ### Parameters - **content** (Content) - Required - The SwiftUI view displayed by the template. - **textProvider** (CLKTextProvider) - Required - The text provider for the text below the view. The template supports multicolored text. ### Request Example init(content: mySwiftUIView, textProvider: myTextProvider) ``` -------------------------------- ### init(line1ImageProvider:line2TextProvider:) Source: https://developer.apple.com/documentation/clockkit/clkcomplicationtemplategraphicextralargecircularstackimage/init%28line1imageprovider%3Aline2textprovider%3A%29 Initializes a template with a full-color image and a text provider for watchOS complications. ```APIDOC ## init(line1ImageProvider:line2TextProvider:) ### Description Creates a template with an image and a small amount of text. This initializer is deprecated. ### Parameters - **line1ImageProvider** (CLKFullColorImageProvider) - Required - A full-color image provider. - **line2TextProvider** (CLKTextProvider) - Required - The text provider for the text below the image. The template supports multicolored text from this text provider. ### Request Example init(line1ImageProvider: line1ImageProvider, line2TextProvider: line2TextProvider) ``` -------------------------------- ### Get Privacy Behavior (Deprecated) Source: https://developer.apple.com/documentation/clockkit/clkcomplicationdatasource/getprivacybehavior%28for%3Awithhandler%3A%29 Use this deprecated method to get the privacy behavior for a complication. It requires a handler to process the behavior. ```swift optional func getPrivacyBehavior( for complication: CLKComplication, withHandler handler: @escaping (CLKComplicationPrivacyBehavior) -> Void ) ``` -------------------------------- ### Get Timeline Animation Behavior (Async) Source: https://developer.apple.com/documentation/clockkit/clkcomplicationdatasource/gettimelineanimationbehavior%28for%3Awithhandler%3A%29 This is the asynchronous version for getting the timeline animation behavior. It is the modern approach for handling timeline transitions. ```swift optional func timelineAnimationBehavior(for complication: CLKComplication) async -> CLKComplicationTimelineAnimationBehavior ``` -------------------------------- ### init(row1Column1TextProvider:row1Column2TextProvider:row2Column1TextProvider:row2Column2TextProvider:row3Column1TextProvider:row3Column2TextProvider:) Source: https://developer.apple.com/documentation/clockkit/clkcomplicationtemplatemodularlargecolumns/init%28row1column1textprovider%3Arow1column2textprovider%3Arow2column1textprovider%3Arow2column2textprovider%3Arow3column1textprovider%3Arow3column2textprovider%3A%29 Initializes a template that displays two columns of text across three rows. ```APIDOC ## init(row1Column1TextProvider:row1Column2TextProvider:row2Column1TextProvider:row2Column2TextProvider:row3Column1TextProvider:row3Column2TextProvider:) ### Description Creates a template that has two columns of text. This method is deprecated. ### Parameters - **row1Column1TextProvider** (CLKTextProvider) - Required - The text provider for the first row in the first column. - **row1Column2TextProvider** (CLKTextProvider) - Required - The text provider for the first row in the second column. - **row2Column1TextProvider** (CLKTextProvider) - Required - The text provider for the second row in the first column. - **row2Column2TextProvider** (CLKTextProvider) - Required - The text provider for the second row in the second column. - **row3Column1TextProvider** (CLKTextProvider) - Required - The text provider for the third row in the first column. - **row3Column2TextProvider** (CLKTextProvider) - Required - The text provider for the third row in the second column. ``` -------------------------------- ### Retrieve Localizable Sample Template Source: https://developer.apple.com/documentation/clockkit/clkcomplicationdatasource/getlocalizablesampletemplate%28for%3Awithhandler%3A%29 Provides a sample template for a complication. The system calls this once per supported complication upon installation. ```swift optional func getLocalizableSampleTemplate( for complication: CLKComplication, withHandler handler: @escaping (CLKComplicationTemplate?) -> Void ) ``` ```swift optional func localizableSampleTemplate(for complication: CLKComplication) async -> CLKComplicationTemplate? ``` -------------------------------- ### init(line1TextProvider:line2TextProvider:) Source: https://developer.apple.com/documentation/clockkit/clkcomplicationtemplatemodularsmallstacktext/init%28line1textprovider%3Aline2textprovider%3A%29 Initializes a new template that displays two lines of text in a modular small stack format. ```APIDOC ## init(line1TextProvider:line2TextProvider:) ### Description Creates a new template that has two lines of text. This initializer is deprecated as of watchOS 7.0. ### Parameters #### Path Parameters - **line1TextProvider** (CLKTextProvider) - Required - A text provider for the top line of text. - **line2TextProvider** (CLKTextProvider) - Required - A text provider for the bottom line of text. ### Request Example init(line1TextProvider: line1Provider, line2TextProvider: line2Provider) ``` -------------------------------- ### CLKFullColorImageProvider Initializer Source: https://developer.apple.com/documentation/clockkit/clkfullcolorimageprovider/init%28fullcolorimage%3Atintedimageprovider%3A%29 Creates an image provider that produces full-color and tinted images. This initializer is deprecated starting from watchOS 6.0. ```APIDOC ## convenience init(fullColorImage:tintedImageProvider:) ### Description Creates an image provider that produces full-color and tinted images. ### Method convenience init ### Parameters #### Parameters - **image** (UIImage) - The image to display for full-color complications. - **tintedImageProvider** (CLKImageProvider?) - An image provider that produces images for tinted complications. ### Return Value An image provider that produces full-color and tinted images. For more information about tinted images, see `tintedImageProvider`. ### Discussion For information about the image sizes and masks used by the different complication families, see Complication Images. ### See Also - `convenience init(fullColorImage: UIImage)` ``` -------------------------------- ### init(imageProvider:fillFraction:ringStyle:) Source: https://developer.apple.com/documentation/clockkit/clkcomplicationtemplatecircularsmallringimage/init%28imageprovider%3Afillfraction%3Aringstyle%3A%29 Initializes a new template with a specified image provider, fill fraction, and ring style. ```APIDOC ## init(imageProvider:fillFraction:ringStyle:) ### Description Creates a new template from the provided image, fill fraction, and ring style. This method is deprecated as of watchOS 7.0. ### Parameters - **imageProvider** (CLKImageProvider) - Required - The image provider for the main image. The system renders the image as a tinted template image. - **fillFraction** (Float) - Required - A value between 0.0 and 1.0 that indicates how much of the ring fills. - **ringStyle** (CLKComplicationRingStyle) - Required - The ring’s style. ### Request Example init(imageProvider: myImageProvider, fillFraction: 0.5, ringStyle: .closed) ``` -------------------------------- ### Get and Set the End Date for CLKTimeIntervalTextProvider Source: https://developer.apple.com/documentation/clockkit/clktimeintervaltextprovider/enddate Use this property to get or set the end date for the time interval. The date must be chronologically after the startDate and cannot be nil. This property is deprecated. ```swift var endDate: Date { get set } ``` -------------------------------- ### Creating the Text Provider Source: https://developer.apple.com/documentation/clockkit/clktimeintervaltextprovider Initializes a CLKTimeIntervalTextProvider with specified start and end dates, optionally including time zone information. ```APIDOC ### Creating the Text Provider `convenience init(start: Date, end: Date)` Creates and returns a text provider with the specified start and end dates. `convenience init(start: Date, end: Date, timeZone: TimeZone?)` Creates and returns a text provider with the specified dates and time zone information. ``` -------------------------------- ### init(headerImageProvider:headerTextProvider:body1TextProvider:body2TextProvider:) Source: https://developer.apple.com/documentation/clockkit/clkcomplicationtemplategraphicrectangularstandardbody/init%28headerimageprovider%3Aheadertextprovider%3Abody1textprovider%3Abody2textprovider%3A%29 Initializes a new template with a header image, header text, and two rows of body text. ```APIDOC ## init(headerImageProvider:headerTextProvider:body1TextProvider:body2TextProvider:) ### Description Creates a new template that has a header row with an image and text, and two rows of body text. ### Parameters - **headerImageProvider** (CLKFullColorImageProvider?) - Optional - A full-color image provider. - **headerTextProvider** (CLKTextProvider) - Required - The text provider for the header text. - **body1TextProvider** (CLKTextProvider) - Required - The text provider for the first row of body text. - **body2TextProvider** (CLKTextProvider?) - Optional - The text provider for the second row of body text. ``` -------------------------------- ### Deprecated Method to Get Localizable Sample Template Source: https://developer.apple.com/documentation/clockkit/clkcomplicationdatasource/getplaceholdertemplate%28for%3Awithhandler%3A%29 This deprecated method gets a localizable template that shows sample data for the specified complication. It takes a CLKComplication and a handler for the template. ```swift func getLocalizableSampleTemplate(for: CLKComplication, withHandler: (CLKComplicationTemplate?) -> Void) ``` -------------------------------- ### init(headerImageProvider:headerTextProvider:row1Column1TextProvider:row1Column2TextProvider:row2Column1TextProvider:row2Column2TextProvider:) Source: https://developer.apple.com/documentation/clockkit/clkcomplicationtemplatemodularlargetable/init%28headerimageprovider%3Aheadertextprovider%3Arow1column1textprovider%3Arow1column2textprovider%3Arow2column1textprovider%3Arow2column2textprovider%3A%29 Initializes a template that features a header row with an image and text, along with two columns of text across two rows. ```APIDOC ## init(headerImageProvider:headerTextProvider:row1Column1TextProvider:row1Column2TextProvider:row2Column1TextProvider:row2Column2TextProvider:) ### Description Creates a template that has a header row with an image and text, and two columns of text. This initializer is deprecated. ### Parameters - **headerImageProvider** (CLKImageProvider?) - Optional - The image provider for the header image. - **headerTextProvider** (CLKTextProvider) - Required - The text provider for the header text. - **row1Column1TextProvider** (CLKTextProvider) - Required - The text provider for the first row of the first column. - **row1Column2TextProvider** (CLKTextProvider) - Required - The text provider for the first row of the second column. - **row2Column1TextProvider** (CLKTextProvider) - Required - The text provider for the second row of the first column. - **row2Column2TextProvider** (CLKTextProvider) - Required - The text provider for the second row of the second column. ``` -------------------------------- ### Get Timeline Animation Behavior (Deprecated) Source: https://developer.apple.com/documentation/clockkit/clkcomplicationdatasource/gettimelineanimationbehavior%28for%3Awithhandler%3A%29 Use this deprecated method to get the animation behavior when transitioning between timeline entries. Implement only if your app supports Time Travel on watchOS 4 or earlier. ```swift optional func getTimelineAnimationBehavior( for complication: CLKComplication, withHandler handler: @escaping (CLKComplicationTimelineAnimationBehavior) -> Void ) ``` -------------------------------- ### init(headerLabel:headerTextProvider:body1TextProvider:body2TextProvider:) Source: https://developer.apple.com/documentation/clockkit/clkcomplicationtemplategraphicrectangularstandardbodyview/init%28headerlabel%3Aheadertextprovider%3Abody1textprovider%3Abody2textprovider%3A%29 Creates a new template that has a header row with a SwiftUI view and text, and two rows of body text. ```APIDOC ## init(headerLabel:headerTextProvider:body1TextProvider:body2TextProvider:) ### Description Creates a new template that has a header row with a SwiftUI view and text, and two rows of body text. This initializer is deprecated. ### Parameters - **headerLabel** (Label) - Required - The SwiftUI view displayed by the template. - **headerTextProvider** (CLKTextProvider) - Required - The text provider for the header text. Supports multicolored text. - **body1TextProvider** (CLKTextProvider) - Required - The text provider for the first row of body text. Supports multicolored text. - **body2TextProvider** (CLKTextProvider) - Optional - The text provider for the second row of body text. Supports multicolored text. ### Request Example init( headerLabel: myLabel, headerTextProvider: myHeaderText, body1TextProvider: myBody1Text, body2TextProvider: myBody2Text ) ``` -------------------------------- ### Get and Set twoPieceImageBackground Source: https://developer.apple.com/documentation/clockkit/clkimageprovider/twopieceimagebackground Use this property to get or set the background image for a two-piece image. This image is tinted and composited behind the foreground image in multicolor environments. Specify nil to display only the foreground image. ```swift var twoPieceImageBackground: UIImage? { get set } ``` -------------------------------- ### Deprecated Initializer: init(textProvider:) Source: https://developer.apple.com/documentation/clockkit/clkcomplicationtemplatecircularsmallsimpletext/init%28textprovider%3A%29 This initializer is used to create a new template from the provided text. It is deprecated starting from watchOS 7.0. ```APIDOC ## init(textProvider:) ### Description Creates a new template from the provided text. ### Method Initializer (Deprecated) ### Endpoint N/A (Initializer) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```swift init(textProvider: CLKTextProvider) ``` ### Response #### Success Response (N/A) N/A #### Response Example N/A ### Notes - Deprecated in watchOS 7.0. - The `textProvider` parameter is used for the text in the center of the template. For multicolor faces, the system uses the text provider’s tint color. For other faces, the system ignores the provided tint color and uses a system color instead. ``` -------------------------------- ### Get Placeholder Template for Complication Source: https://developer.apple.com/documentation/clockkit/clkcomplicationdatasource/getplaceholdertemplate%28for%3Awithhandler%3A%29 Use this deprecated method to get a static template for the complication selection screen. The handler executes with a template containing cached data, conveying the complication's data type. ```swift optional func getPlaceholderTemplate( for complication: CLKComplication, withHandler handler: @escaping (CLKComplicationTemplate?) -> Void ) ``` -------------------------------- ### init(headerTextProvider:row1Column1TextProvider:row1Column2TextProvider:row2Column1TextProvider:row2Column2TextProvider:) Source: https://developer.apple.com/documentation/clockkit/clkcomplicationtemplatemodularlargetable/init%28headertextprovider%3Arow1column1textprovider%3Arow1column2textprovider%3Arow2column1textprovider%3Arow2column2textprovider%3A%29 Initializes a template that displays a header and two columns of text across two rows. ```APIDOC ## init(headerTextProvider:row1Column1TextProvider:row1Column2TextProvider:row2Column1TextProvider:row2Column2TextProvider:) ### Description Creates a template that has a header and two columns of text. This method is deprecated. ### Parameters - **headerTextProvider** (CLKTextProvider) - Required - The text provider for the header. - **row1Column1TextProvider** (CLKTextProvider) - Required - The text provider for the first row of the first column. - **row1Column2TextProvider** (CLKTextProvider) - Required - The text provider for the first row of the second column. - **row2Column1TextProvider** (CLKTextProvider) - Required - The text provider for the second row of the first column. - **row2Column2TextProvider** (CLKTextProvider) - Required - The text provider for the second row of the second column. ``` -------------------------------- ### GET CLKComplication.family Source: https://developer.apple.com/documentation/clockkit/clkcomplication/family Retrieves the family to which the complication belongs. ```APIDOC ## GET CLKComplication.family ### Description The family property determines how much space is available to a complication and which templates you can use to display your complication data. ### Method GET ### Endpoint CLKComplication.family ### Response - **family** (CLKComplicationFamily) - The family to which the complication belongs. ``` -------------------------------- ### init(line1TextProvider:line2TextProvider:) Source: https://developer.apple.com/documentation/clockkit/clkcomplicationtemplatecircularsmallstacktext/init%28line1textprovider%3Aline2textprovider%3A%29 Initializes a new template that displays two lines of text in a circular small stack format. ```APIDOC ## init(line1TextProvider:line2TextProvider:) ### Description Creates a new template that has two lines of text. This initializer is deprecated. ### Parameters - **line1TextProvider** (CLKTextProvider) - Required - A text provider for the top line of text. - **line2TextProvider** (CLKTextProvider) - Required - A text provider for the bottom line of text. ### Request Example init(line1TextProvider: line1Provider, line2TextProvider: line2Provider) ``` -------------------------------- ### Set up HealthKit background observer query Source: https://developer.apple.com/documentation/clockkit/creating-and-updating-a-complication-s-timeline Initializes the HealthKit store, enables background delivery, and executes an observer query for caffeine samples. ```swift // Authorize HealthKit and set up the background observer query. public func setUpHealthKit() { // Make sure HealthKit is available and authorized. guard isAvailable else { return } guard store.authorizationStatus(for: caffeineType) == .sharingAuthorized else { return } // Return if an observer query is already running. guard backgroundObserver == nil else { return } logger.debug("Setting up the background observer queries.") // Set up the background delivery rate. store.enableBackgroundDelivery(for: caffeineType, frequency: .immediate) { success, error in guard success else { self.logger.error("Unable to set up background delivery from HealthKit: \(error!.localizedDescription)") fatalError() } } // Set up the observer query. backgroundObserver = HKObserverQuery(sampleType: caffeineType, predicate: nil, updateHandler: processUpdate(query:completionHandler:error:)) if let query = backgroundObserver { logger.debug("Starting the background observer query.") store.execute(query) } } ``` -------------------------------- ### GET ringStyle Property Source: https://developer.apple.com/documentation/clockkit/clkcomplicationtemplateutilitariansmallringtext/ringstyle Documentation for the ringStyle property of CLKComplicationTemplateUtilitarianSmallRingText. ```APIDOC ## Property: ringStyle ### Description The style of the progress ring for the complication template. ### Declaration `var ringStyle: CLKComplicationRingStyle { get set }` ### Availability watchOS 2.0–26.0 (Deprecated) ``` -------------------------------- ### Deprecated Initializer: init(textProvider:imageProvider:) Source: https://developer.apple.com/documentation/clockkit/clkcomplicationtemplateutilitarianlargeflat/init%28textprovider%3Aimageprovider%3A%29 This initializer is used to create a CLKComplicationTemplateUtilitarianLargeFlat with both text and an image. It is deprecated starting from watchOS 7.0. ```APIDOC ## init(textProvider:imageProvider:) ### Description Creates a new template that has a single row with an image and a long line of text. ### Method Initializer (Deprecated) ### Endpoint N/A (Initializer) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) None #### Response Example None ### Parameters - **textProvider** (CLKTextProvider) - Required - The text provider for the template. For multicolor faces, like the Utility face, the system uses the text provider’s tint color for the text. For other faces, the system ignores the provided tint color, and uses a system color instead. - **imageProvider** (CLKImageProvider?) - Optional - The image provider for the leading image. The system renders the image as a tinted template image, a bitmap image where only the opacity of the image matters. For more information, see Providing images for different appearances. ``` -------------------------------- ### CLKComplicationAppIntentWidgetMigrationConfiguration Initialization Source: https://developer.apple.com/documentation/clockkit/clkcomplicationappintentwidgetmigrationconfiguration Documentation for creating a new instance of CLKComplicationAppIntentWidgetMigrationConfiguration. ```APIDOC ## init(kind: String, extensionBundleIdentifier: String, intent: Intent, localizedDisplayName: String) ### Description Creates an object that describes a watchOS complication that uses app intents in your WidgetKit extension. ### Parameters - **kind** (String) - Required - A string that uniquely identifies a widget in your WidgetKit extension. - **extensionBundleIdentifier** (String) - Required - The bundle identifier for your WidgetKit extension. - **intent** (Intent) - Required - An intent that provides additional configuration information to your WidgetKit complication. - **localizedDisplayName** (String) - Required - A localized name for the complication. ``` -------------------------------- ### GET ringStyle Property Source: https://developer.apple.com/documentation/clockkit/clkcomplicationtemplatemodularsmallringimage/ringstyle Documentation for the ringStyle property of CLKComplicationTemplateModularSmallRingImage. ```APIDOC ## Property: ringStyle ### Description The style of the progress ring for the complication template. ### Declaration `var ringStyle: CLKComplicationRingStyle { get set }` ### Availability watchOS 2.0–26.0 (Deprecated) ### See Also - `imageProvider`: The image to display in the complication. - `fillFraction`: The fraction of the ring to fill. ``` -------------------------------- ### Getting the Complication Server Source: https://developer.apple.com/documentation/clockkit/clkcomplicationserver Retrieves the shared instance of the CLKComplicationServer. ```APIDOC ## Getting the Complication Server `class func sharedInstance() -> Self` ### Description Returns the shared complication server. ### Method `class func` ### Endpoint N/A (Class method) ### Parameters None ### Request Example None ### Response #### Success Response (Instance) - **Self** (CLKComplicationServer) - The shared complication server instance. ### Response Example ```swift let server = CLKComplicationServer.sharedInstance() ``` ``` -------------------------------- ### Initializer: init(gaugeProvider:bottomImageProvider:centerTextProvider:) Source: https://developer.apple.com/documentation/clockkit/clkcomplicationtemplategraphicextralargecircularopengaugeimage Creates a new instance of the template with the specified gauge, image, and text providers. ```APIDOC ## init(gaugeProvider:bottomImageProvider:centerTextProvider:) ### Description Creates a new template with an open circular gauge, an image at the bottom, and text in the center. ### Parameters - **gaugeProvider** (CLKGaugeProvider) - Required - The gauge to display in the complication. - **bottomImageProvider** (CLKFullColorImageProvider) - Required - The image to display at the bottom of the gauge. - **centerTextProvider** (CLKTextProvider) - Required - The text to display in the center of the gauge. ``` -------------------------------- ### init(headerImageProvider:headerTextProvider:body1TextProvider:) Source: https://developer.apple.com/documentation/clockkit/clkcomplicationtemplatemodularlargestandardbody/init%28headerimageprovider%3Aheadertextprovider%3Abody1textprovider%3A%29 Initializes a new template with a header containing an image and text, and a single row of body text. ```APIDOC ## init(headerImageProvider:headerTextProvider:body1TextProvider:) ### Description Creates a new template that has a header row with an image and text, and a row of body text. ### Parameters - **headerImageProvider** (CLKImageProvider?) - An image provider for the header. The system renders the image as a tinted template image. - **headerTextProvider** (CLKTextProvider) - The text provider for the header. - **body1TextProvider** (CLKTextProvider) - The text provider for the row of body text. ``` -------------------------------- ### GET ringStyle Property Source: https://developer.apple.com/documentation/clockkit/clkcomplicationtemplateextralargeringimage/ringstyle Documentation for the ringStyle instance property of CLKComplicationTemplateExtraLargeRingImage. ```APIDOC ## Property: ringStyle ### Description The style of the progress ring. This property is deprecated. ### Declaration `var ringStyle: CLKComplicationRingStyle { get set }` ### Availability watchOS 3.0–26.0 (Deprecated) ``` -------------------------------- ### init(headerTextProvider:body1TextProvider:) Source: https://developer.apple.com/documentation/clockkit/clkcomplicationtemplategraphicrectangularstandardbody/init%28headertextprovider%3Abody1textprovider%3A%29 Creates a new template that has a row of header text and a row of body text. ```APIDOC ## init(headerTextProvider:body1TextProvider:) ### Description Creates a new template that has a row of header text and a row of body text. This initializer is deprecated as of watchOS 7.0. ### Parameters - **headerTextProvider** (CLKTextProvider) - Required - The text provider for the header text. The template supports multicolored text from this text provider. - **body1TextProvider** (CLKTextProvider) - Required - The text provider for the body text. The template supports multicolored text from this text provider. ### Request Example init(headerTextProvider: myHeaderTextProvider, body1TextProvider: myBodyTextProvider) ``` -------------------------------- ### GET imageProvider Property Source: https://developer.apple.com/documentation/clockkit/clkcomplicationtemplatecircularsmallsimpleimage/imageprovider Details regarding the imageProvider property for CLKComplicationTemplateCircularSmallSimpleImage. ```APIDOC ## Property: imageProvider ### Description The image to display in the complication. ### Availability watchOS 2.0–26.0 (Deprecated) ### Declaration @NSCopying var imageProvider: CLKImageProvider { get set } ``` -------------------------------- ### GET supportedFamilies Source: https://developer.apple.com/documentation/clockkit/clkcomplicationdescriptor/supportedfamilies-4ckbx Retrieves the list of complication families supported by the descriptor. ```APIDOC ## GET supportedFamilies ### Description The supportedFamilies property returns the set of complication families that support this specific type of complication descriptor. ### Method GET ### Endpoint CLKComplicationDescriptor.supportedFamilies ### Response #### Success Response (200) - **supportedFamilies** ([CLKComplicationFamily]) - An array of complication families supported by the descriptor. ### Response Example { "supportedFamilies": ["CLKComplicationFamilyGraphicCircular", "CLKComplicationFamilyGraphicRectangular"] } ``` -------------------------------- ### Get Localized Display Name Source: https://developer.apple.com/documentation/clockkit/clkcomplicationappintentwidgetmigrationconfiguration/intent Obtain a localized name for the complication. ```swift let localizedDisplayName: String ``` -------------------------------- ### init() Source: https://developer.apple.com/documentation/clockkit/clkfullcolorimageprovider/init%28%29 Initializes an empty full color image provider. Note that this method is deprecated as of watchOS 7.0. ```APIDOC ## init() ### Description Creates an empty full color image provider. ### Availability watchOS 2.0–7.0 (Deprecated) ### Syntax ```swift init() ``` ``` -------------------------------- ### Initializer: init(date:units:) Source: https://developer.apple.com/documentation/clockkit/clkdatetextprovider/init%28date%3Aunits%3A%29 Creates and returns a text provider with the specified date and the default time zone. ```APIDOC ## init(date:units:) ### Description Creates and returns a text provider with the specified date and the default time zone. This method is deprecated. ### Parameters - **date** (Date) - Required - The date to display. - **calendarUnits** (NSCalendar.Unit) - Required - The units to include in the resulting date string. ### Return Value A text provider initialized with the specified date and time zone information. ### Discussion The text provider created by this method uses the default time zone information for the current user. Date values are formatted according to the user’s current locale information. ``` -------------------------------- ### init(headerImageProvider:headerTextProvider:body1TextProvider:) Source: https://developer.apple.com/documentation/clockkit/clkcomplicationtemplategraphicrectangularstandardbody/init%28headerimageprovider%3Aheadertextprovider%3Abody1textprovider%3A%29 Creates a new template that has a header row with an image and text, and a row of body text. ```APIDOC ## init(headerImageProvider:headerTextProvider:body1TextProvider:) ### Description Creates a new template that has a header row with an image and text, and a row of body text. This initializer is deprecated. ### Parameters - **headerImageProvider** (CLKFullColorImageProvider?) - Optional - A full-color image provider. - **headerTextProvider** (CLKTextProvider) - Required - The text provider for the header text. The template supports multicolored text from this text provider. - **body1TextProvider** (CLKTextProvider) - Required - The text provider for the first row of body text. The template supports multicolored text from this text provider. ``` -------------------------------- ### GET ringStyle Property Source: https://developer.apple.com/documentation/clockkit/clkcomplicationtemplateextralargeringtext/ringstyle Accesses the style of the progress ring for the CLKComplicationTemplateExtraLargeRingText template. ```APIDOC ## Property: ringStyle ### Description The style of the progress ring. This property is deprecated as of watchOS 26.0. ### Declaration `var ringStyle: CLKComplicationRingStyle { get set }` ### Availability watchOS 3.0–26.0 (Deprecated) ``` -------------------------------- ### GET gaugeProvider Property Source: https://developer.apple.com/documentation/clockkit/clkcomplicationtemplategraphiccircularclosedgaugeview/gaugeprovider Retrieves or sets the gauge provider for the CLKComplicationTemplateGraphicCircularClosedGaugeView template. ```APIDOC ## Property: gaugeProvider ### Description The gauge provider for the template. This property is deprecated as of watchOS 7.0. ### Declaration `final var gaugeProvider: CLKGaugeProvider { get set }` ### Availability - watchOS 7.0–26.0 (Deprecated) ``` -------------------------------- ### init(textProvider:label:) Source: https://developer.apple.com/documentation/clockkit/clkcomplicationtemplategraphiccornertextview/init%28textprovider%3Alabel%3A%29 Initializes a CLKComplicationTemplateGraphicCornerTextView with a text provider and a SwiftUI label. ```APIDOC ## init(textProvider:label:) ### Description Creates a template with a line of text and a SwiftUI view. This initializer is deprecated. ### Parameters - **textProvider** (CLKTextProvider) - Required - The text provider for the text. The template supports multicolored text from this text provider. - **label** (Label) - Required - The SwiftUI view displayed by the template. ### Request Example init(textProvider: myTextProvider, label: mySwiftUIView) ``` -------------------------------- ### GET gaugeProvider Property Source: https://developer.apple.com/documentation/clockkit/clkcomplicationtemplategraphiccircularclosedgaugetext/gaugeprovider Details regarding the gaugeProvider instance property for CLKComplicationTemplateGraphicCircularClosedGaugeText. ```APIDOC ## Property: gaugeProvider ### Description The gauge to display in the complication. This property is deprecated as of watchOS 26.0. ### Declaration @NSCopying var gaugeProvider: CLKGaugeProvider { get set } ### See Also - centerTextProvider: CLKTextProvider (The text to display in the center of the gauge) ``` -------------------------------- ### init(_:) Source: https://developer.apple.com/documentation/clockkit/clkcomplicationtemplategraphiccircularview/init%28_%3A%29 Initializes a CLKComplicationTemplateGraphicCircularView with a specific SwiftUI view content. ```APIDOC ## init(_:) ### Description Creates a template that has a circular SwiftUI view. This initializer is deprecated. ### Parameters - **content** (Content) - Required - The SwiftUI view displayed by the template. ### Request Example init(mySwiftUIView) ``` -------------------------------- ### GET gaugeProvider Property Source: https://developer.apple.com/documentation/clockkit/clkcomplicationtemplategraphiccircularclosedgaugeimage/gaugeprovider Details for the gaugeProvider instance property used in CLKComplicationTemplateGraphicCircularClosedGaugeImage. ```APIDOC ## Property: gaugeProvider ### Description The gauge to display in the complication. This property is deprecated as of watchOS 26.0. ### Declaration `@NSCopying var gaugeProvider: CLKGaugeProvider { get set }` ### See Also - imageProvider: CLKFullColorImageProvider (The image to display) ``` -------------------------------- ### Initialize Template with Image and Text Columns Source: https://developer.apple.com/documentation/clockkit/clkcomplicationtemplatemodularlargecolumns Use this initializer to create a template that includes an optional image at the beginning of each row, followed by two columns of text. Provide CLKImageProvider and CLKTextProvider objects as needed. ```swift init(row1ImageProvider: CLKImageProvider?, row1Column1TextProvider: CLKTextProvider, row1Column2TextProvider: CLKTextProvider, row2ImageProvider: CLKImageProvider?, row2Column1TextProvider: CLKTextProvider, row2Column2TextProvider: CLKTextProvider, row3ImageProvider: CLKImageProvider?, row3Column1TextProvider: CLKTextProvider, row3Column2TextProvider: CLKTextProvider) ``` -------------------------------- ### init(row1Column1TextProvider:row1Column2TextProvider:row2Column1TextProvider:row2Column2TextProvider:) Source: https://developer.apple.com/documentation/clockkit/clkcomplicationtemplatemodularsmallcolumnstext/init%28row1column1textprovider%3Arow1column2textprovider%3Arow2column1textprovider%3Arow2column2textprovider%3A%29 Creates a new template that has two columns of text. This initializer is deprecated as of watchOS 7.0. ```APIDOC ## init(row1Column1TextProvider:row1Column2TextProvider:row2Column1TextProvider:row2Column2TextProvider:) ### Description Creates a new template that has two columns of text. ### Parameters - **row1Column1TextProvider** (CLKTextProvider) - Required - A text provider for the top row of the first column. - **row1Column2TextProvider** (CLKTextProvider) - Required - A text provider for the top row of the second column. - **row2Column1TextProvider** (CLKTextProvider) - Required - A text provider for the bottom row of the first column. - **row2Column2TextProvider** (CLKTextProvider) - Required - A text provider for the bottom row of the second column. ``` -------------------------------- ### Getting the Active Complications Source: https://developer.apple.com/documentation/clockkit/clkcomplicationserver Accesses the list of active complications for the current app. ```APIDOC ## Getting the Active Complications `var activeComplications: [CLKComplication]?` ### Description The active complications for the current app. ### Method `var` (Read-only property) ### Endpoint N/A ### Parameters None ### Request Example None ### Response #### Success Response (Array) - **activeComplications** ([CLKComplication]?) - An array of active CLKComplication objects, or nil if none are active. ### Response Example ```swift if let activeComps = CLKComplicationServer.sharedInstance().activeComplications { for comp in activeComps { print(comp.identifier) } } ``` ``` -------------------------------- ### init(textProvider:) Initializer Source: https://developer.apple.com/documentation/clockkit/clkcomplicationtemplateutilitariansmallflat/init%28textprovider%3A%29 Initializes a new CLKComplicationTemplateUtilitarianSmallFlat template with a single line of text. ```APIDOC ## init(textProvider:) ### Description Creates a new template that has a single line of text. This method is deprecated as of watchOS 7.0. ### Parameters #### Path Parameters - **textProvider** (CLKTextProvider) - Required - The text provider for a single line of text. For multicolor faces, the system uses the text provider’s tint color; for others, it uses a system color. ### Request Example init(textProvider: myTextProvider) ``` -------------------------------- ### GET kind property Source: https://developer.apple.com/documentation/clockkit/clkcomplicationintentwidgetmigrationconfiguration/kind Retrieves the unique identifier for a widget in a WidgetKit extension. ```APIDOC ## kind ### Description A string that uniquely identifies a widget in your WidgetKit extension. ### Availability watchOS 9.0+ ### Declaration var kind: String { get } ``` -------------------------------- ### init(imageProvider:) Source: https://developer.apple.com/documentation/clockkit/clkcomplicationtemplatemodularsmallsimpleimage/init%28imageprovider%3A%29 Initializes a new template using the specified image provider. Note that this method is deprecated. ```APIDOC ## init(imageProvider:) ### Description Creates a new template from the provided image. This method is deprecated as of watchOS 7.0. ### Parameters #### Parameters - **imageProvider** (CLKImageProvider) - Required - The image provider for an image that fills the template. The system renders the image as a tinted template image. ### Request Example init(imageProvider: CLKImageProvider) ``` -------------------------------- ### Property: startDate Source: https://developer.apple.com/documentation/clockkit/clktimeintervalgaugeprovider/startdate The starting time and date for the gauge’s time interval. ```APIDOC ## GET startDate ### Description The starting time and date for the gauge’s time interval. ### Method GET ### Endpoint CLKTimeIntervalGaugeProvider.startDate ### Response - **startDate** (Date) - The starting time and date for the gauge’s time interval. ``` -------------------------------- ### init(textProvider:fillFraction:ringStyle:) Source: https://developer.apple.com/documentation/clockkit/clkcomplicationtemplatecircularsmallringtext/init%28textprovider%3Afillfraction%3Aringstyle%3A%29 Initializes a new CLKComplicationTemplateCircularSmallRingText template with specified text, fill fraction, and ring style. ```APIDOC ## init(textProvider:fillFraction:ringStyle:) ### Description Creates a new template from the provided text, fill fraction, and ring style. This method is deprecated as of watchOS 7.0. ### Parameters - **textProvider** (CLKTextProvider) - Required - A text provider for the text in the center of the template. - **fillFraction** (Float) - Required - A value between 0.0 and 1.0 that indicates how much of the ring fills. - **ringStyle** (CLKComplicationRingStyle) - Required - The ring’s style. ``` -------------------------------- ### Getting the Text Source: https://developer.apple.com/documentation/clockkit/clksimpletextprovider Properties to access the long and short versions of the text stored in a CLKSimpleTextProvider. ```APIDOC ## Getting the Text ### `var text: String` #### Description The long version of text that you want to display. #### Method Getter #### Endpoint N/A ### `var shortText: String?` #### Description A shorter version of the text. #### Method Getter #### Endpoint N/A ``` -------------------------------- ### Get onePieceImage Source: https://developer.apple.com/documentation/clockkit/clkimageprovider/twopieceimagebackground Retrieves the template image to be used as a one-piece image. This property is deprecated. ```swift var onePieceImage: UIImage ``` -------------------------------- ### init(onePieceImage:) Source: https://developer.apple.com/documentation/clockkit/clkimageprovider/init%28onepieceimage%3A%29 Initializes a CLKImageProvider with a single template image. ```APIDOC ## init(onePieceImage:) ### Description Creates and returns an image provider with the specified one-piece image. This method is deprecated. ### Method Initializer ### Parameters - **onePieceImage** (UIImage) - Required - The template image to display. Only the alpha channel is used to define contents. ### Return Value An image provider with only the one-piece image. ### Discussion Use this method to create an image provider with only a one-piece image. The resulting image provider displays the one-piece image in all contexts. You can customize the tint color by modifying the tintColor property. ``` -------------------------------- ### init(textProvider:imageProvider:) Source: https://developer.apple.com/documentation/clockkit/clkcomplicationtemplategraphiccornertextimage/init%28textprovider%3Aimageprovider%3A%29 Initializes a template with a line of text and an image. Note that this method is deprecated as of watchOS 7.0. ```APIDOC ## init(textProvider:imageProvider:) ### Description Creates a template with a line of text and an image. This method is deprecated. ### Parameters - **textProvider** (CLKTextProvider) - Required - The text provider for the text. The template supports multicolored text from this text provider. - **imageProvider** (CLKFullColorImageProvider) - Required - A full-color image provider. ### Request Example init(textProvider: myTextProvider, imageProvider: myImageProvider) ``` -------------------------------- ### Get CLKGaugeProvider Style Source: https://developer.apple.com/documentation/clockkit/clkgaugeprovider/style This property was used to retrieve the style of the gauge. It is deprecated and should not be used. ```swift var style: CLKGaugeProviderStyle { get } ``` -------------------------------- ### Create a localizable text provider Source: https://developer.apple.com/documentation/clockkit/clktextprovider/localizabletextprovider%28withstringsfiletextkey%3A%29 Initializes a text provider using a key from the ckcomplication.strings file. ```Swift class func localizableTextProvider(withStringsFileTextKey textKey: String) -> Self ``` ```Swift class func localizableTextProvider(withStringsFileTextKey: String, shortTextKey: String?) -> Self ``` ```Swift class func localizableTextProvider(withStringsFileFormatKey: String, textProviders: [CLKTextProvider]) -> Self ``` -------------------------------- ### GET imageProvider Property Source: https://developer.apple.com/documentation/clockkit/clkcomplicationtemplategraphiccornercircularimage/imageprovider Accesses the full-color image provider for the circular complication template. ```APIDOC ## Property: imageProvider ### Description The image to display within the circular mask of the complication template. ### Declaration @NSCopying var imageProvider: CLKFullColorImageProvider { get set } ### Discussion This image provider produces a full-color image, masked to a circle. Note that this property is deprecated as of watchOS 26.0. ``` -------------------------------- ### Creating an Image Provider Source: https://developer.apple.com/documentation/clockkit/clkimageprovider Initializers for creating CLKImageProvider instances. ```APIDOC ## Creating an Image Provider ### `convenience init(onePieceImage: UIImage)` Creates and returns an image provider with the specified one-piece image. ### `convenience init(onePieceImage: UIImage, twoPieceImageBackground: UIImage?, twoPieceImageForeground: UIImage?)` Creates and returns an image provider with both one-piece and two-piece images. ``` -------------------------------- ### GET latestTimeTravelDate Source: https://developer.apple.com/documentation/clockkit/clkcomplicationserver/latesttimetraveldate Retrieves the latest date supported by Time Travel for complication timelines. ```APIDOC ## GET latestTimeTravelDate ### Description The latest date supported by Time Travel. When constructing your timeline, do not create any entries after this date as they will not be displayed. ### Property `var latestTimeTravelDate: Date { get }` ### Availability watchOS 2.0–7.0 (Deprecated) ``` -------------------------------- ### init(line1TextProvider:line2TextProvider:) Source: https://developer.apple.com/documentation/clockkit/clkcomplicationtemplateextralargestacktext/init%28line1textprovider%3Aline2textprovider%3A%29 Initializes a new template with two rows of text. Note that this method is deprecated as of watchOS 7.0. ```APIDOC ## init(line1TextProvider:line2TextProvider:) ### Description Creates a new template that has two rows of text. ### Parameters - **line1TextProvider** (CLKTextProvider) - Required - A text provider for the top row of text. - **line2TextProvider** (CLKTextProvider) - Required - A text provider for the bottom row of text. ### Request Example init(line1TextProvider: line1Provider, line2TextProvider: line2Provider) ``` -------------------------------- ### GET CLKComplicationIntentWidgetMigrationConfiguration.intent Source: https://developer.apple.com/documentation/clockkit/clkcomplicationintentwidgetmigrationconfiguration/intent Retrieves the SiriKit intent associated with the migration configuration for a WidgetKit complication. ```APIDOC ## Property: intent ### Description A SiriKit intent that provides additional configuration information to your WidgetKit complication. ### Availability watchOS 9.0+ ### Declaration @NSCopying var intent: INIntent { get } ``` -------------------------------- ### Initialize CLKTimeTextProvider with Date Source: https://developer.apple.com/documentation/clockkit/clktimetextprovider/date Creates a text provider for displaying a specific time. This initializer is deprecated. ```swift convenience init(date: Date) ``` -------------------------------- ### GET extensionBundleIdentifier Source: https://developer.apple.com/documentation/clockkit/clkcomplicationintentwidgetmigrationconfiguration/extensionbundleidentifier Retrieves the bundle identifier for the WidgetKit extension associated with the migration configuration. ```APIDOC ## Property: extensionBundleIdentifier ### Description The bundle identifier for your WidgetKit extension. ### Availability watchOS 9.0+ ### Declaration `var extensionBundleIdentifier: String { get }` ``` -------------------------------- ### localizableSampleTemplate(for:) Source: https://developer.apple.com/documentation/clockkit/clkcomplicationdatasource/getlocalizablesampletemplate%28for%3Awithhandler%3A%29 Asynchronously gets a localizable template that shows sample data for the specified complication. ```APIDOC ## localizableSampleTemplate(for:) ### Description Asynchronously gets a localizable template that shows sample data for the specified complication. ### Method `optional func localizableSampleTemplate(for complication: CLKComplication) async -> CLKComplicationTemplate?` ### Parameters #### Path Parameters * None #### Query Parameters * None #### Request Body * None ### Request Example * None ### Response #### Success Response (200) * `CLKComplicationTemplate?`: The template object containing your placeholder data. ### Response Example * None ``` -------------------------------- ### init(imageProvider:) Initializer Source: https://developer.apple.com/documentation/clockkit/clkcomplicationtemplatecircularsmallsimpleimage/init%28imageprovider%3A%29 Initializes a new CLKComplicationTemplateCircularSmallSimpleImage template using the specified image provider. ```APIDOC ## init(imageProvider:) ### Description Creates a new template from the provided image. This method is deprecated as of watchOS 7.0. ### Method Initializer ### Parameters #### Path Parameters - **imageProvider** (CLKImageProvider) - Required - The image provider for an image that fills the template. The system renders the image as a tinted template image. ``` -------------------------------- ### init(text:) Initializer Source: https://developer.apple.com/documentation/clockkit/clksimpletextprovider/init%28text%3A%29 Initializes a CLKSimpleTextProvider with the specified long-form text string. ```APIDOC ## init(text:) ### Description Creates and returns a text provider with the specified long form text. This method is deprecated. ### Method Initializer ### Parameters - **text** (String) - Required - The text that you want to display. This value is assigned to the text property of your text provider object. ### Return Value A text provider initialized with the specified content. ``` -------------------------------- ### Get Widget Kind Source: https://developer.apple.com/documentation/clockkit/clkcomplicationappintentwidgetmigrationconfiguration/intent Retrieve the string that uniquely identifies a widget in your WidgetKit extension. ```swift let kind: String ``` -------------------------------- ### init(gaugeProvider:bottomTextProvider:centerTextProvider:) Source: https://developer.apple.com/documentation/clockkit/clkcomplicationtemplategraphiccircularopengaugesimpletext/init%28gaugeprovider%3Abottomtextprovider%3Acentertextprovider%3A%29 Initializes a new template with an open circular gauge, a bottom text element, and a center text element. ```APIDOC ## init(gaugeProvider:bottomTextProvider:centerTextProvider:) ### Description Creates a new template with an open circular gauge, a small text element at the bottom, and a larger text element in the center. This method is deprecated. ### Parameters - **gaugeProvider** (CLKGaugeProvider) - Required - The gauge provider for the template. - **bottomTextProvider** (CLKTextProvider) - Required - The text provider for the bottom text. Supports multicolored text. - **centerTextProvider** (CLKTextProvider) - Required - The text provider for the central text. Supports multicolored text. ### Request Example init(gaugeProvider: myGauge, bottomTextProvider: myBottomText, centerTextProvider: myCenterText) ```