I’m trying to do a SwiftData Migration from non-versioned to versioned and encountering this error:
CoreData: fault: Could not materialize Objective-C class named "Set" from declared attribute value type "Set<Date>" of attribute named deletedDates
In my Model, I have the following attribute which works fine on its own, but I’m unable to run with the VersionedSchema and MigrationPlan.
@Model class Item {
...
var deletedDates: Set<Date> = []
...
}
Is there any way to make the migration work without losing any user data?