showsWidgetContainerBackground crashes on iOS17 beta 6 on a real device

When using @Environment(.showsWidgetContainerBackground) inside any view, the app and widgets crash in a real device with iOS17 beta 6. The same build works perfectly on simulators and a real device running iOS17 beta 5. Using XCode 15 beta 6 to build the app.

I am getting this error:

Symbol not found: _$s7SwiftUI17EnvironmentValuesV9WidgetKitE05showsE19ContainerBackgroundSbvg

I just created a new blank project and only added that line and it crashes. Filled a feedback report. I am the only one?

struct ContentView: View {
    
    @Environment(\.showsWidgetContainerBackground) var showsBackground: Bool
    
    var body: some View {
        VStack {
            Image(systemName: "globe")
                .imageScale(.large)
                .foregroundStyle(.tint)
            Text("Hello, world!")
        }
        .padding()
    }
}
Answered by simonfromhelix in 762577022

This issue is fixed for me with Xcode 15 Beta 7 for iOS 17 Beta 7 AND iOS 16.6 Release. Great news!

Happens for me too!

I get this crash on iOS 17 beta 6 AND iOS 16.6 😣

Same here on iOS 17 beta 6 (real device only, works fine in the Simulator).

Accepted Answer

This issue is fixed for me with Xcode 15 Beta 7 for iOS 17 Beta 7 AND iOS 16.6 Release. Great news!

showsWidgetContainerBackground crashes on iOS17 beta 6 on a real device
 
 
Q