<!--
{
  "documentType" : "article",
  "framework" : "ClockKit",
  "identifier" : "/documentation/ClockKit/loading-future-timeline-events",
  "metadataVersion" : "0.1.0",
  "role" : "article",
  "title" : "Loading future timeline events"
}
-->

# Loading future timeline events

Preserve battery life and improve performance on the watch by providing a timeline with expected data and updates.

## Discussion

ClockKit renders your complication in advance to ensure that it’s instantly available when the user glances at their watch. To minimize power usage, create a timeline that includes your app’s current data as well as future entries. These timeline entries let ClockKit automatically update your complication without requiring further background tasks.

For example, a meeting complication could display all the meetings that the user currently has scheduled, with a timeline entry for each meeting. If details about the meeting change, your server can use PushKit <doc://com.apple.documentation/documentation/PushKit/PKPushType/complication> notifications to alert the user of these changes, updating the timeline as needed. For more information, see [Keeping your complications up to date](/documentation/ClockKit/keeping-your-complications-up-to-date).

### Batch Load Data

To batch load data for future timeline entries, implement your data source’s [`getTimelineEndDate(for:withHandler:)`](/documentation/ClockKit/CLKComplicationDataSource/getTimelineEndDate(for:withHandler:)) method and pass the handler the date of the last timeline entry you can create. For example, a meeting app might return the date of the user’s last meeting.

```swift
func getTimelineEndDate(for complication: CLKComplication, withHandler handler: @escaping (Date?) -> Void) {
    handler(myMeetings.last?.date)
}
```

If your app can’t provide future data, pass `nil` to the handler.

> Note:
> In watchOS 6 and earlier the system sets the end date to <doc://com.apple.documentation/documentation/Foundation/NSDate/distantFuture> if you passed `nil` to ``doc://com.apple.clockkit/documentation/ClockKit/CLKComplicationDataSource/getTimelineEndDate(for:withHandler:)``. To indicate that your app can batch load future timeline entries, implement your data source’s ``doc://com.apple.clockkit/documentation/ClockKit/CLKComplicationDataSource/getSupportedTimeTravelDirections(for:withHandler:)`` method, and pass ``doc://com.apple.clockkit/documentation/ClockKit/CLKComplicationTimeTravelDirections/forward`` to the handler.

Next, implement your data source’s [`getTimelineEntries(for:after:limit:withHandler:)`](/documentation/ClockKit/CLKComplicationDataSource/getTimelineEntries(for:after:limit:withHandler:)) method.

This process is similar to implementing the [`getCurrentTimelineEntry(for:withHandler:)`](/documentation/ClockKit/CLKComplicationDataSource/getCurrentTimelineEntry(for:withHandler:)) and may reuse much of the same code. However, your implementation must create timeline entries starting at the specified date. The entries must occur in chronological order, and the `limit` parameter determines the maximum number of entries you can pass to the handler. ClockKit calls this method again whenever it needs to extend your timeline.

For details on creating timeline entries, see [Creating a timeline entry](/documentation/ClockKit/creating-a-timeline-entry).

### Schedule Future Events

When constructing your timeline entries, choose dates that make sense based on when the user needs to see the data. ClockKit displays a timeline entry at the time specified by the entry’s [`date`](/documentation/ClockKit/CLKComplicationTimelineEntry/date) property. For some types of data, you may want to specify a date before the event actually occurs. For example, if you’re implementing a meeting app, alert users to the meeting before it starts. One option is to set the dates so that the complication displays the next meeting, as soon as the current meeting begins.

![An illustration showing three meetings in the timeline. For the future events, the date is set to the previous meeting’s start time.](images/com.apple.clockkit/media-3161329@2x.png)

## See Also

[Enabling Complications for Your watchOS App](/documentation/ClockKit/enabling-complications-for-your-watchos-app)

Set up your watchOS app’s complications.

[Adding Placeholders for Your Complication](/documentation/ClockKit/adding-placeholders-for-your-complication)

Provide the placeholders that users see when adding your complication to a watch face.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)