<!--
{
  "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/TimelineEntryRelevance/init(score:duration:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "WidgetKit"
    ],
    "preciseIdentifier" : "s:9WidgetKit22TimelineEntryRelevanceV5score8durationACSf_Sdtcfc"
  },
  "title" : "init(score:duration:)"
}
-->

# init(score:duration:)

Creates an object that represents the importance of a widget and the
length of time for WidgetKit to consider it for rotation to the top of
the stack.

```
init(score: Float, duration: TimeInterval = 0.0)
```

## Parameters

`score`

A value on a scale of your choosing, indicating the
importance of an entry compared to other entries in the same
timeline.

`duration`

The number of seconds following an entry’s date that
WidgetKit may rotate the widget to the top of the stack.

---

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)