I have an app that is crashing only in iOS13. I don't see this issue on my iOS14 device or the simulator.
Here's the error I get in the console and I included the breakpoint error. The crash is happening on line 14.
Context in environment is not connected to a persistent store coordinator: <NSManagedObjectContext: 0x281050c40>
Thread 1: EXC_BREAKPOINT (code=1, subcode=0x1bf7c5678)
Here's the error I get in the console and I included the breakpoint error. The crash is happening on line 14.
Context in environment is not connected to a persistent store coordinator: <NSManagedObjectContext: 0x281050c40>
Thread 1: EXC_BREAKPOINT (code=1, subcode=0x1bf7c5678)
Code Block struct BLAH: View { // Core data @Environment(\.managedObjectContext) var managedObjectContext @FetchRequest(fetchRequest: FavoriteItem.getAllFavorites()) var isFavorite:FetchedResults<FavoriteItem> var body: some View { ... List { ... if hideFavorites == false { ForEach(isFavorite.filter({ <CRASH HERE> searchText.isEmpty ? true : $0.name.lowercased().contains(searchText.lowercased()) })) {isFavorite in FavoriteView( runclub: RunClubsv2.init(id: isFavorite.runclubid, name: isFavorite.name, location: isFavorite.location, date: isFavorite.date, category: isFavorite.category, dayofweek: isFavorite.dayofweek, link: isFavorite.link, hour: isFavorite.hour, minute: isFavorite.minute, favorite: false), name: isFavorite.name, date: isFavorite.date, location: isFavorite.location, link: isFavorite.link, category: isFavorite.category, dayofweek: isFavorite.dayofweek, hour: isFavorite.hour, minute: isFavorite.minute, runclubid: isFavorite.runclubid ) }.onDelete { indexSet in let deleteItem = self.isFavorite[indexSet.first!] self.managedObjectContext.delete(deleteItem) do { try self.managedObjectContext.save() }catch { print(error) } } } } } }