Post

Replies

Boosts

Views

Activity

Reply to Migration Questions CoreData to SwiftData
In playing further and watching past Core Data videos about migration I believe the answers are (1) We can move from an optional type to a non-optional type in our SwiftData classes if we provide a default value. (1a) No migration at all seems to be required or it is a light migration that is invisible to me (2) Since I'm using CloudKit I can't change the types from Int16 to Int as I can't remove items from the CloudKit schema. It's not a big deal as I already used a computed property to convert from the Int the app uses to the Int16 the schema requires. Swift computed properties make this wrapping of types really easy to do.
Topic: App & System Services SubTopic: iCloud Tags:
Jul ’23
Reply to Migration Questions CoreData to SwiftData
In playing further and watching past Core Data videos about migration I believe the answers are (1) We can move from an optional type to a non-optional type in our SwiftData classes if we provide a default value. (1a) No migration at all seems to be required or it is a light migration that is invisible to me (2) Since I'm using CloudKit I can't change the types from Int16 to Int as I can't remove items from the CloudKit schema. It's not a big deal as I already used a computed property to convert from the Int the app uses to the Int16 the schema requires. Swift computed properties make this wrapping of types really easy to do.
Topic: App & System Services SubTopic: iCloud Tags:
Replies
Boosts
Views
Activity
Jul ’23