Skip to main content
0 votes
1 answer
34 views

I'm new to SwiftUI Charts. My basic setup is working fine, except that I need to customize the colors of a multiline chart. The data is coming from two SwiftData classes: class Parts { var name: ...
awado's user avatar
  • 237
1 vote
1 answer
41 views

I'm migrating a SwiftData model from V1 to V2. In V1, StoredBook.authors was a [String]?. In V2, it’s now a relationship to Author objects ([Author]?). I wrote a custom migration to create Author ...
Bela's user avatar
  • 11
-1 votes
0 answers
80 views

I am working on refactoring a SwiftData project originally built before iOS 26. I have three existing models—ModelA, ModelB, and ModelC—which share almost identical properties. Back when I created the ...
Finn Wagner's user avatar
2 votes
1 answer
123 views

I'm completely stumped on this. I can't find anything that clearly explains to me what this code crashes when trying to run in on macOS but runs perfectly when on iOS. I'm very new to SwiftData, and ...
DashingDave's user avatar
0 votes
1 answer
71 views

I'm working on a SwiftUI MacOS application that currently has two windows, the primary window, and a command palette window. I'm still pretty new to SwiftUI having only picked it up a couple of months ...
Fluster.IO's user avatar
0 votes
0 answers
112 views

In order to ship a database with my iOS/PadOS app in the most space-efficient manner, I am adding a non-editable store to the app's bundle and referencing it directly. I believe this is the approved ...
Ash's user avatar
  • 9,461
-1 votes
1 answer
218 views

I have a SwiftData model. For the sake of simplicity, the model looks a bit like this: class LogItem { var timestamp: Date = Date() var itemName:String = "" var itemValue:Int = ...
Mitch Cohen's user avatar
  • 1,673
3 votes
1 answer
135 views

In SwiftData, the .externalStorage attribute signifies that we can easily store any binary data adjacent to the database. This seems like a great way to have easily downloaded/cached files. However, ...
Josh Kopecek's user avatar
1 vote
1 answer
116 views

Background: I have complex Swift Data models with some Relationships, and at some point, my Xcode Preview is no longer working when I want to init a ModelContainer in it. So I tried to debug and ...
Tony Chen's user avatar
  • 227
Best practices
0 votes
2 replies
93 views

In SwiftData / CloudKit, when you have a root model object, it's pretty straightforward when you want to add or delete it from the model: simply use a modelContext variable and use its insert and ...
Ser Pounce's user avatar
  • 14.4k
0 votes
1 answer
85 views

I have been struggling with arbitrary behavior in SwiftData when using a two-layer relationship in a predicate. I wrote a very simple app to verify this behavior. I have three models, grandparent, ...
Ulrich's user avatar
  • 231
0 votes
1 answer
89 views

I'm testing SwiftData model inheritance (new in iOS 26) and encountering a crash when combining: A model that inherits from another model A separate model with relationships to the parent class ...
simnik's user avatar
  • 483
Advice
0 votes
1 replies
95 views

I am currently in the middle of developing an iOS app which uses SwiftData. I want to future proof my data models by laying the ground work for data migrations down the line but I am pretty new to the ...
user30115770's user avatar
2 votes
1 answer
144 views

I am trying to set a predicate on an array of objects inside a SwiftUI View (and failing to do so) My data models consist of two independent tables and a third table that holds associations between ...
Peter M's user avatar
  • 7,637
0 votes
0 answers
88 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

15 30 50 per page
1
2 3 4 5
54