Instance Method


Gets a localizable template that shows sample data for the specified complication.


optional func getLocalizableSampleTemplate(for complication: CLKComplication, withHandler handler: @escaping (CLKComplicationTemplate?) -> Void)



The complication tied to the request. Use the complication family information in this object to determine which set of templates are valid. For example, if the complication family is CLKComplicationFamily.utilitarianLarge, you’d instantiate the CLKComplicationTemplateUtilitarianLargeFlat class for your template.


The handler to execute with the template. This block has no return value and takes the following parameter:


The template object containing your placeholder data. The data in this template is cached and displayed for your complication.


The system calls this method once per supported complication when your extension is installed, and the results are cached. In your implementation, instantiate the appropriate template class and populate the resulting object with localized data. The data you supply should be fake, but it should reflect what your complication would normally look like.

If you pass nil to the handler, the system generates a default placeholder template from your app’s icon and name.

See Also