Closed Xedart closed 4 years ago
Hey @Xedart, yeah the migration between versions is kinda tricky. There are few ways of fixing this one, though:
Codable
initializer in which you would check if there is a value for modifiedDate
, if not then you would add a default value (the fallback is that every type in your app would get these default values if they are missing, even the ones that are not stored in the defaults)DefaultsBridge
based on the provided codable one, that would call a different initializer that could migrate your data in it@sunshinejr Yup, custom Codable
init solved the issue. Thanks!
@Xedart awesome 🚀
Suppose I have a class
Then I need to add a new property to the class Document:
When I do so, all previously stored documents are erased. Is there a way to do something about it?