Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
57 views

I'm experiencing the following error with my SwiftData container when running a build: Code=134504 "Cannot use staged migration with an unknown model version." Code Structure - Summary I ...
tishly's user avatar
  • 67
-12 votes
1 answer
249 views

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, ...
Peter M's user avatar
  • 7,591
0 votes
0 answers
86 views

I have 5 Swift Data models: SDPlanBrief, SDAirport, SDChart, SDIndividualRunwayAirport, SDLocationBrief I went live with my first release of the app, with no migration plan or versioned schemas. ...
Paul Wilson's user avatar
0 votes
0 answers
63 views

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: [...
Nishant Minerva's user avatar
5 votes
1 answer
739 views

I'm using SwiftData in my SwiftUI iOS app, and I need to implement a MigrationPlan before launching, so things go smoothly later when I need to make changes to the data being saved. For example, ...
pez's user avatar
  • 4,337
3 votes
1 answer
241 views

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 ...
Navin Samuel's user avatar
1 vote
0 answers
203 views

My app crashes at startup when trying to create SwiftData ModelContainer after creating a migration state from V1 to V2. This is the error I receive: Thread 1: Fatal error: Failed to create ...
Robert Basamac's user avatar
0 votes
0 answers
90 views

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 [...
zkvvoob's user avatar
  • 496
0 votes
1 answer
561 views

I have a problem updating a SwiftData model by adding a property. Specifically, I have the following model and I am trying to update it by adding an id. The problem is that, if I do this, all records ...
Prec99's user avatar
  • 39
1 vote
0 answers
187 views

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 ...
Doug Idle's user avatar
3 votes
0 answers
171 views

My problem is: I already have a One-To-Many relationship. I just didn't implement the reverse property in the Many part, bc I didn't need it at the time. Now I do and here comes the problems. Those ...
nico_p2000's user avatar
1 vote
0 answers
121 views

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 ...
MatFetsch's user avatar
3 votes
3 answers
2k views

I've started developing app with SwiftData and decided to move to VersionedSchema recently and it just fails when I try to add a new version of a schema with Code=134504 "Cannot use staged ...
Aleks Kuznetsov's user avatar
-2 votes
1 answer
219 views

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 ...
matyasl's user avatar
  • 539
1 vote
0 answers
468 views

I'm encountering an issue where my app crashes when users update to a new version. I reproduced the error locally and basically it happens when I run the app with the new stored field added to the ...
Yury Kaspiarovich's user avatar