14 questions
0
votes
0
answers
97
views
iOS app crashing in simulator after SwiftData refactor [closed]
I've been working on a small, SwiftUI/SwiftData app for personal usage. This has been going well until yesterday when I decided I should refactor the SwiftData side of things (split some tables up, ...
0
votes
0
answers
55
views
SwiftData Migration Plan for deleting a Model no longer need, iCloud Sync is enabled
I don't know how do I write a migration plan for this if it's required, is this a lightweight migration or a complex migration
@Model
class ParkModel {
var items: [String]?
init(items: [...
3
votes
1
answer
226
views
Do we need to copy unchanged models to new versioned schema in SwiftData during migration?
Question with sample code:
We have two Swift Data models in VersionedSchemaV1 and want to add one optional field in one of the model in next app version.
Shall we copy only changed model to ...
0
votes
0
answers
90
views
Combine NSPredicate and SwiftData Predicate for iOS AppIntent (Shortcuts) EntityPropertyQuery
Happy New Year, all!
I'm trying to migrate my CoreData app to SwiftData. Prior to the migration, the Siri Shortcut's EntityPropertyQuery worked just fine, but now I'm struggling how to combine the [...
1
vote
0
answers
187
views
SwiftData - Cannot use staged migration with an unknown coordinator model version
I'm having trouble with my first migration using SwiftData - it's pretty simple, just adding a new var into the class.
Here's the v1 model:
import Foundation
import SwiftData
@Model
final class ...
1
vote
0
answers
117
views
SwiftData migration with iCloud and multi-device support
I’m writing test apps using SwiftData. Running migrations locally works fine. But I couldn’t find anything on how to handle a situation, where my local app is running on e.g. ‘MigrationSchemaV2’ and ...
-2
votes
1
answer
214
views
SwiftData - how to correctly update application when SwiftData Model(s) change?
would anybody be so kind to provide a link or "steps to follow" that need to be done when you change a model and you want the updated app releases not to crash?
Whenever I make a change to ...