Thank you! This worked for me. I simply changed
modelContext.delete(item)
to
modelContext.delete(item)
modelContext.save()
and this fixed the crash.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: