---
title: "init(intent:description:)"
framework: widgetkit
role: symbol
role_heading: Initializer
path: "widgetkit/appintentrecommendation/init(intent:description:)-7zn32"
---

# init(intent:description:)

Creates a recommended configuration for a widget on platforms that don’t offer a dedicated user interface to customize widgets.

## Declaration

```swift
init(intent: Intent, description: some StringProtocol)
```

## Parameters

- `intent`: The intent that represents the recommended configuration.
- `description`: A description that helps the user understand the value of the preconfigured configuration option. For example, if the configuration represents a location in a weather app, the description may be the name of one of the user’s favorite cities, such as Cupertino.

## Discussion

Discussion note: On platforms that offer a dedicated user interface for configuring widgets — for example, iOS or macOS — AppIntentRecommendation is inactive.

## See Also

### Creating a recommended widget configuration

- [init(intent:description:)](widgetkit/appintentrecommendation/init(intent:description:)-2p4dh.md)
- [init(intent:description:)](widgetkit/appintentrecommendation/init(intent:description:)-65igj.md)
