I'm made an very basic iOS Widget Extension with (on iOS 16):
struct TotoView: View
var body: some View {
VStack {
Text("Toto")
.font(.headline)
}
}
}
struct TotoWidget: Widget {
var body: some WidgetConfiguration {
IntentConfiguration(kind: "myKind", intent: ViewTodayIntent.self, provider: TimelineProvider()) { entry in
TotoView(entry: entry)
}
.configurationDisplayName("Today work")
.description("Show today work sessions")
.supportedFamilies([.systemSmall, .systemMedium])
}
}
On the SwiftUI Canvas preview, I can see the "Toto" text.
BUT when I select the Widget Target and run in the simulator, I only have the placeholder in place of text. Any idea of why? Note that not only the text is replaced by placegholder but also an Image(systemName:)
I think the issue seems to be related by IntentConfiguration (as everything works fine with StaticConfiguration)
I'm on xCode 14.