Post

Replies

Boosts

Views

Activity

Reply to Thread 1: Fatal error: expected attribute to be Codable
I had exactly the same error message during runtime. The solution for me was to change from .modelContainer(for: [StoredHabit.self], isAutoSaveEnabled: true, isUndoEnable: true) to .modelContainer(for: [StoredHabit.self]). After that, the error was gone and SwiftData worked properly again.
Replies
Boosts
Views
Activity
Sep ’23