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

Data Race in Widgets?

I've turned on Swift 6 language mode and noticed that during runtime Xcode gives this warning for a new widget (iOS 17.2):

warning: data race detected: @MainActor function at TestWidgetExtension/TestWidget.swift:240 was not called on the main thread

struct TestWidget: Widget {
  let kind: String = "TestWidget"
  
  var body: some WidgetConfiguration {
    AppIntentConfiguration(
      kind: kind,
      intent: ConfigurationAppIntent.self,
      provider: Provider()
    ) { entry in // LINE 240
      TestWidgetEntryView(entry: entry)
        .containerBackground(Color.white, for: .widget)
    }
  }
}

Is there any way to solve this on my side?

Thank you!

Data Race in Widgets?
 
 
Q