Skip to main content
0 votes
0 answers
58 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
2 votes
1 answer
81 views

I'm working on a SwiftUI app using SwiftData, and I'm very new to both frameworks, and swift in general to be honest. I'm trying to create a webview that embeds a monaco editor that will then send the ...
Fluster.IO's user avatar
0 votes
0 answers
27 views

My application contains two different databases. The first contains information that does not change and will be distributed in the app's bundle. The second contains information that can be edited and ...
Ash's user avatar
  • 9,443
-12 votes
1 answer
254 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
Best practices
0 votes
9 replies
122 views

I have two SwiftData models like below: @Model final class SDStock { init() {} var id = UUID() var title = "abc" var code = "123456" @Relationship(deleteRule: ....
stephen's user avatar
  • 597
0 votes
1 answer
81 views

I am trying to use a custom property inside a SwiftData model: import SwiftData struct Foo { var name: String } @Model final class Bar { var id: String var name: String var foo: Foo ...
koen's user avatar
  • 5,862
1 vote
2 answers
117 views

I’m new to iOS development and currently learning to persist data using SwiftData. I’m building a very simple to-do list app to understand how local persistence works. However, I’ve hit a wall and ...
Kevin Rodriguez's user avatar
2 votes
1 answer
231 views

I’m using Swift 6.2 with MainActor set as the default global actor in my project. When I create a SwiftData @Model that conforms to a protocol extending PersistentModel, I get actor isolation errors ...
HáMzà VyNøs's user avatar
1 vote
1 answer
79 views

Obviously it isn't allowed to put the @Relation(inverse)-annotation on both models. Otherwise one receives an error-message about "Circular Reference". Therefore, should one put the ...
mewi's user avatar
  • 791
0 votes
1 answer
75 views

I'm working on an app where I have a view AddMonthView where you put in the monthly balance for financial accounts. That account list is dynamic. So I spent some time trying to figure out how to bind ...
Ryan Sayles's user avatar
  • 3,443
0 votes
0 answers
180 views

Every time I insert a subclass (MYShapeLayer) into the model context, the app crashes with an error: DesignerPlayground crashed due to fatalError in BackingData.swift at line 908. Never access a full ...
Mohammed's user avatar
  • 1,504
1 vote
1 answer
117 views

I have an iOS app that uses SwiftData with @Model types. I’m porting it to macOS and want a document-based app where each window is its own document (like TextEdit). I understand the basic document ...
Berry Blue's user avatar
  • 16.9k
0 votes
1 answer
125 views

I need help debugging why my app is failing on hardware trying to initialize the ModelContainer. This is my first app so I may be missing something obvious, but I have two models that I'm trying load, ...
Open-Analysis's user avatar
0 votes
0 answers
90 views

I'm very new to SwiftData and have run into an issue where I need to change a datatype in a model. I've attempted to implement a migration plan but my original schema was not of type VersionedSchema ...
Jaxon's user avatar
  • 1
1 vote
1 answer
79 views

I need a way to keep a global count of all model items in SwiftData. My goal is to: track how many entries exist in the model. have the count be reactive (update when items are inserted or deleted). ...
markb's user avatar
  • 1,381

15 30 50 per page
1
2 3 4 5
54