Post

Replies

Boosts

Views

Activity

Reply to Swift UI Preview Crash
I had the same problem. In my case it was the following: I had an ObservableObject in the App subclass that I was passing through environmentObject() to the content view. I had forgotten to add a corresponding call to environmentObject() in ContentView_Previews.previews Once I added that back in it stopped crashing. struct ContentView_Previews: PreviewProvider {     static var previews: some View {         ContentView().environmentObject(Item())     } } I hope it helps :-)
Nov ’22