I am seeing a similar issue mentioned here:
https://developer.apple.com/forums/thread/758893?answerId=794462022#794462022
Seems to be related to deleting Models that have relationships.
FB14041374
Post
Replies
Boosts
Views
Activity
I am seeing the same error when I try to delete models that have a relationship set to cascade delete. The crash does not occur if the relationship is empty when deleting the model.
FB14041374
I am seeing this same issue. In my case the SwiftData modal's computed property will update the view correctly on the parent view but not on the grandparent view. Changing everything to @Observable classes works but is obviously not a solution for SwiftData.
Has anyone seen any progress/fixes for this?
I am seeing the same issue. Has anyone found a fix for this?
I am also seeing problems when getting this error. The NavigationLink view that this toggle is on is dismissed when toggling and goes back to the previous view. It is quite annoying. As @swiftaero mentioned above the issue is happening in the sim and on device while developing the app, I have not released the app yet so I can't test it on deployment or in TestFlight.
2 Interesting things about my situation with this error is that it is happening when I toggle an @AppStorage binding. If I change it to an @State binding it does not dismiss the view back to the previous one. Also the view has a list of core data records from an @FetchRequest and this error happens and dismisses the view when I delete a record from the list with .onDelete.
I have tried to replicate this issue in another app and I get the error but not the dismissing of the view. My current line of thinking is that the error&dismiss is linked to editing an object that lives outside of the view. But I am defiantly stumped at this point and will have to see if it happens in TestFlight like @swiftaero mentioned.