---
title: "getAlwaysOnTemplate(for:withHandler:)"
framework: clockkit
role: symbol
role_heading: Instance Method
path: "clockkit/clkcomplicationdatasource/getalwaysontemplate(for:withhandler:)"
---

# getAlwaysOnTemplate(for:withHandler:)

Returns the template to use during Always On.

## Declaration

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

```swift
optional func alwaysOnTemplate(for complication: CLKComplication) async -> CLKComplicationTemplate?
```

## Discussion

Discussion If your implementation returns nil, ClockKit uses the current timeline entry, if one exists. Users can control whether ClockKit shows sensitive data during Always On by choosing Settings > Display & Brightness > Always On > Hide Sensitive Complications. If the user enables Hide Sensitive Complications and the complication’s privacy behavior is CLKComplicationPrivacyBehavior.hideOnLockScreen, ClockKit also hides the complication during Always On. For more information about privacy behaviors, see getPrivacyBehavior(for:withHandler:).

## See Also

### Deprecated methods

- [CLKLaunchedTimelineEntryDateKey](clockkit/clklaunchedtimelineentrydatekey.md)
- [CLKLaunchedComplicationIdentifierKey](clockkit/clklaunchedcomplicationidentifierkey.md)
- [getComplicationDescriptors(handler:)](clockkit/clkcomplicationdatasource/getcomplicationdescriptors(handler:).md)
- [handleSharedComplicationDescriptors(_:)](clockkit/clkcomplicationdatasource/handlesharedcomplicationdescriptors(_:).md)
- [getLocalizableSampleTemplate(for:withHandler:)](clockkit/clkcomplicationdatasource/getlocalizablesampletemplate(for:withhandler:).md)
- [getPrivacyBehavior(for:withHandler:)](clockkit/clkcomplicationdatasource/getprivacybehavior(for:withhandler:).md)
- [CLKComplicationPrivacyBehavior](clockkit/clkcomplicationprivacybehavior.md)
- [getTimelineEndDate(for:withHandler:)](clockkit/clkcomplicationdatasource/gettimelineenddate(for:withhandler:).md)
- [getCurrentTimelineEntry(for:withHandler:)](clockkit/clkcomplicationdatasource/getcurrenttimelineentry(for:withhandler:).md)
- [getTimelineEntries(for:after:limit:withHandler:)](clockkit/clkcomplicationdatasource/gettimelineentries(for:after:limit:withhandler:).md)
- [getTimelineAnimationBehavior(for:withHandler:)](clockkit/clkcomplicationdatasource/gettimelineanimationbehavior(for:withhandler:).md)
- [CLKComplicationTimelineAnimationBehavior](clockkit/clkcomplicationtimelineanimationbehavior.md)
- [getSupportedTimeTravelDirections(for:withHandler:)](clockkit/clkcomplicationdatasource/getsupportedtimetraveldirections(for:withhandler:).md)
- [CLKComplicationTimeTravelDirections](clockkit/clkcomplicationtimetraveldirections.md)
- [getTimelineStartDate(for:withHandler:)](clockkit/clkcomplicationdatasource/gettimelinestartdate(for:withhandler:).md)
