When I try to a SwiftUI ContentView that contains a CoreData fetch request, the preview crashes. Wondering what the correct way to setup the @environment so the preview can
This seems to work for the preview.
struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView().environment(.managedObjectContext, PersistenceController.preview.container.viewContext)
My question, how to make it work on the simulator...