Post

Replies

Boosts

Views

Activity

Comment on Migrate Core Data to SwiftData in an App Group (& CloudKit)
As for the transition to SwiftData from Core Data with CloudKit enabled, there are a couple of considerations. You are already following the first one by using the replacePersistentStore method. Using migratePersistentStore will create duplicates in our data. The second one is the speculation that app might freeze during migration if iCloud is disabled. That is why you might want to turn off the sync while the migration is running.
2w
Comment on Migrate Core Data to SwiftData in an App Group (& CloudKit)
let configuration = ModelConfiguration("Something.sqlite", schema: fullSchema). This line of code will cause the creation of a database file like this: Something.sqlite.store. I highly doubt that this is what we want. Also, it doesn't look like SwiftData generates a .store file based on the Core Data's .sqlite file on my end. I've tested it many times. I always get an empty database. I then need to point SwiftData to the old .sqlite file used by CoreData with an explicit URL.
3w