Using Xcode 12 beta 2 on Big Sur beta. Having a view like this:
When I try to compile and build this on macOS, I get this fatal error:
I am definitely using the SwiftUI App Lifecycle because this is a fresh new project created with Multiplatform app template.
Why do I get this error? Can I fix it somehow?
Code Block swift import SwiftUI struct ContentView: View { @SceneStorage("selectedItem") var selection: String? var body: some View { NavigationView { List(selection: $selection) { … list contents }.listStyle(SidebarListStyle()) } } }
When I try to compile and build this on macOS, I get this fatal error:
Code Block Fatal error: @SceneStorage is only for use with SwiftUI App Lifecycle.: file SwiftUI, line 0
I am definitely using the SwiftUI App Lifecycle because this is a fresh new project created with Multiplatform app template.
Why do I get this error? Can I fix it somehow?