I have a model with a FamilyActivitySelection, currently i'm using a codable struct to store it with UserDefaults, but would prefer strongly to transition to Swift Data
FamilyActivitySelection is Codable and so SwiftData should be able to handle and you should be able to use the type in a SwiftData model directly.
As far as I know, using Codable
types in SwiftData has some corner cases that need attentions. I don't have more details to share here, but if you see anything not working, feel free to follow up here.
Best,
——
Ziqiao Chen
Worldwide Developer Relations.