Post

Replies

Boosts

Views

Activity

Comment on How does SwiftData schema migration work and what are the possible schema changing operations
It would be helpful if you could elaborate a bit on willMigrate and didMigrate. What exactly has to happen? lets assume we got wllMigrate { context in let oldDatamodel = try context.fetch(oldDataModelDescriptor) for oldData in OldDataModel { --> what happens here? } try? context.save() } didMigrate { context in let newDatamodel = try context.fetch(newDataModelDescriptor) for newData in NewDataModel { --> what happens here? } try? context.save() }
Oct ’24
Comment on Swift UI Preview Crash
I'm using SwiftData and this command solved my problem. I am super thankful. Thank you! Also thanks to everybody else for all that helpful ideas like changing the preview device, or emptying ContentView and repopulating it.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’24