Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

WidgetKit WidgetConfigurationIntent Parameter Icons

In WatchOS 26 you can now configure Apple Watch Widgets that use AppIntents instead of having a preconfigured option via AppIntentRecommendation.

This is demonstrated in the Weather Details Widget. In that, the Intent has been set up such that the options have icons for each parameter.

How can I update my Intent code to offer this?

struct DataPointsWidgetIntent: AppIntent, WidgetConfigurationIntent {
    static var title: LocalizedStringResource = "Data Points Widget Configuration"
    static var description = IntentDescription("Configure the individual data point display for Widgets.")
    
    static var isDiscoverable: Bool { return false}
    
    init() {}

    func perform() async throws -> some IntentResult {
        print("DataPointsWidgetIntent perform")
        return .result()
    }

    @Parameter(title: "Show Individual Data Points", default: true)
    var showDataPoints: Bool?
    @Parameter(title: "Trend Timescale", default: .week)
    var timescale: TimescaleTypeAppEnum?
    
    static var parameterSummary: some ParameterSummary {
        Summary("Test Info") {
            \.$showDataPoints
            \.$timescale
        }
    }
}

enum TimescaleTypeAppEnum: String, AppEnum {
    
    case week
    case fortnight

    static var typeDisplayRepresentation = TypeDisplayRepresentation(name: "Trend Timescale")
    static var caseDisplayRepresentations: [Self: DisplayRepresentation] = [
        .week: "Past Week",
        .fortnight: "Past Fortnight"
    ]
}

Accepted Answer

I have solved this problem.

The answer was in the WWDC25 video Get to know App Intends.

Here's an example of an WidgetConfigurationIntent to toggle a chart showing data points on or off including icons for the two data point display options.

struct WatchDataPointsWidgetIntent: AppIntent, WidgetConfigurationIntent {
    static var title: LocalizedStringResource = "Data Points Widget Configuration"
    static var description = IntentDescription("Configure individual data point display for Watch Widgets.")
    
    static var isDiscoverable: Bool { return false}
    
    init() {}

    func perform() async throws -> some IntentResult {
        print("WatchDataPointsWidgetIntent perform")
        return .result()
    }
    @Parameter(title: "Chart Display Options", default: ChartDataPointsOption.showDataPoints)
    var showDataPoints: ChartDataPointsOption?
    
    static var parameterSummary: some ParameterSummary {
        Summary("Chart Options: \(\.$showDataPoints)")
    }
}

enum ChartDataPointsOption: String, AppEnum {
    case showDataPoints
    case hideDataPoints

    static let typeDisplayRepresentation = TypeDisplayRepresentation(name: "Chart Display Data Points")
    static let caseDisplayRepresentations: [Self: DisplayRepresentation] = [
        ChartDataPointsOption.showDataPoints: DisplayRepresentation(title: "Individual Data Points", image: .init(systemName: "chart.dots.scatter")),
        ChartDataPointsOption.hideDataPoints: DisplayRepresentation(title: "Percentiles Only", image: .init(systemName: "chart.line.uptrend.xyaxis"))
    ]
}
WidgetKit WidgetConfigurationIntent Parameter Icons
 
 
Q