Swiftdata forcing @Model rename

I have an app that uses Member as a @Model Class name. When I installed Xcode 16, Member was not allowed and failed in the Build, so I had to rename the class. If I pass this patch to the app store, my users will lose data. Do you have any suggestions?

Answered by DTS Engineer in 807789022

This was discussed in Xcode 16 broke my SwiftData application. You can see if that helps.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

Looks like you need to perform a migration, see for example https://developer.apple.com/wwdc23/10195

Accepted Answer

This was discussed in Xcode 16 broke my SwiftData application. You can see if that helps.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

Swiftdata forcing @Model rename
 
 
Q