I'm migrating my app from Obj-C to Swift. It uses Core Data, and most of the entities are implemented in Obj-C. I just took a stab at converting one of my views to SwiftUI, and it runs correctly, but Preview crashes with
executeFetchRequest:error: A fetch request must have an entity..
I've tried declaring the fetch request both with and without the entity:
argument:
@FetchRequest(entity: NewsItem.entity(), sortDescriptors: []) var newsItems : FetchedResults<NewsItem>