SwiftData template project crashes with no editing

Hello

Anyone else having a problem with the SwiftData template in Xcode 15?

Having experiemented with SwiftData and got crashes I resorted to creating brand new projects using the template to try to see if I was doing something wrong in my code!

Both new/clean projects, with no editing, on an M1 Macbook Pro and an M2 Macbook Air crash at somepoint when running in the simulator. This seems to happen after you have added some entries using the + button then deleting some. It always seems to happen when deleting!

I've put in a feedback to Apple.

Thanks

I get the same crash when deleting items from the template code. I also filed a FB for it.

Looks like the beta 2 release notes may well have some fix...

SwiftData Known Issues After deleting an item, SwiftUI may attempt to reference the deleted content during the animation causing a crash. (109838173) Workaround: Explicitly save after a delete.

SwiftData template project crashes with no editing
 
 
Q