I am doing a full transition of an app from CoreData to SwiftData. I was able to follow the online guides and extract SwiftData objects from the CoreData model. Everything seems to work except for my Transformable String Arrays. This app is storing CoreData in iCloud.
In my SwiftData model, I have a variable...
@Attribute(.transformable(by: "NSSecureUnarchiveFromData"))
var arrayofStrings: [String]?
The app is able to read the array of strings, however, the debugger gives me this error eventually crashing due to memory.
'NSKeyedUnarchiveFromData' should not be used to for un-archiving and will be removed in a future release
I don't understand, the transformed variable already is 'NSSecureUnarchiveFromData' not 'NSKeyedUnarchiveFromData'. That's the reason why I used NSSecureUnarchiveFromData in my CoreData model because NSKeyedUnarchiveFromData is being phased out. I don't get why the debugger thinks otherwise.
Any thoughts?
It seems with a new Xcode update, the app doesn't crash anymore but still produces the error every time the variable is read from the model. So in a view when it's repeatedly read. The error floods my debugger and doesn't stop.