Thanks to YodagamaHeshan who answered on StackOverflow:
You need to set the selected value using the given configuration in timeLine().
func timeline(for configuration: TestIntent, in context: Context) async -> Timeline<TestEntry> {
let testBool = configuration.bool
let testStr = configuration.str
return Timeline(entries: [
TestEntry(
date: .now,
bool: testBool,
str: testStr,
enum1: configuration.enum1 //<= here
)
], policy: .atEnd)
}
Topic:
App & System Services
SubTopic:
General
Tags: