<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: -",
    "macOS: 11.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WidgetKit",
  "identifier" : "/documentation/WidgetKit/Timeline",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "WidgetKit"
    ],
    "preciseIdentifier" : "s:9WidgetKit8TimelineV"
  },
  "title" : "Timeline"
}
-->

# Timeline

An object that specifies a date for WidgetKit to update a widget’s view.

```
struct Timeline<EntryType> where EntryType : TimelineEntry
```

## Overview

To tell WidgetKit when to update a widget’s view, [`TimelineProvider`](/documentation/WidgetKit/TimelineProvider)
generates a timeline. The timeline contains an array of timeline entry
objects and a refresh policy.

To create timeline entries, declare a custom type that conforms to
`TimelineEntry`. Each entry specifies the date you would like WidgetKit to
update the widget’s view, and any additional information that your widget
needs to render the view. Timeline entries may also include information
about their relevance compared to other entries in timelines for the same
widget kind. WidgetKit uses this relevance information when considering
whether a widget should be promoted in a stack. For more about supplying
relevance information, see [`TimelineEntryRelevance`](/documentation/WidgetKit/TimelineEntryRelevance).

The timeline’s refresh policy specifies the earliest date for WidgetKit to
request a new timeline from the provider. The default refresh policy,
[`atEnd`](/documentation/WidgetKit/TimelineReloadPolicy/atEnd), tells WidgetKit to request a new timeline after the last date in
the array of timeline entries you provide. However, you can use
[`after(_:)`](/documentation/WidgetKit/TimelineReloadPolicy/after(_:)) to indicate a different date either earlier or later than the
default date. Specify an earlier date if you know there’s a point in time
before the end of your timeline entries that may alter the timeline.
Conversely, specify a later date if you know that after the last date, your
timeline won’t change for some period of time. Alternatively, use [`never`](/documentation/WidgetKit/TimelineReloadPolicy/never)
to tell WidgetKit not to request a new timeline at all. In that case, your
app uses [`WidgetCenter`](/documentation/WidgetKit/WidgetCenter) to prompt WidgetKit to request a new timeline.

> Note: WidgetKit may not update the widget’s view exactly at a timeline
> entry’s date. The update may occur at a later date.

For more information about generating timelines, see [`TimelineProvider`](/documentation/WidgetKit/TimelineProvider).

## Topics

### Creating a Timeline

[`init(entries:policy:)`](/documentation/WidgetKit/Timeline/init(entries:policy:))

Creates a timeline for when you want WidgetKit to update a widget’s
view.

### Getting Timeline Properties

[`entries`](/documentation/WidgetKit/Timeline/entries)

An array of timeline entries.

[`policy`](/documentation/WidgetKit/Timeline/policy)

The policy that determines the earliest date and time WidgetKit
requests a new timeline from a timeline provider.

[`TimelineReloadPolicy`](/documentation/WidgetKit/TimelineReloadPolicy)

A type that indicates the earliest date WidgetKit requests a new timeline
from the widget’s provider.



---

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)