<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: -",
    "macOS: 15.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WidgetKit",
  "identifier" : "/documentation/WidgetKit/WidgetRelevanceAttribute/init(context:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "WidgetKit"
    ],
    "preciseIdentifier" : "s:9WidgetKit0A18RelevanceAttributeVAAytRszlE7contextACyytG0cB015RelevantContextV_tcfc"
  },
  "title" : "init(context:)"
}
-->

# init(context:)

Creates a new widget relevance that is relevant in a specific context.

```
init(context: RelevantContext)
```

## Parameters

`context`

the relevant context where this widget is relevant.

---

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)