Comment on iOS 18 SwiftData ModelContext reset I faced the same issue but in the Preview, as I was declaring my container as a let, which was working in iOS 17. Changing the declaration to @Previewable @State var container = .... fixed it. App & System Services iCloud & Data Sep ’24