Skip to main content
2 votes
1 answer
70 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
25 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
-3 votes
1 answer
178 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,585
Best practices
0 votes
9 replies
121 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
79 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
111 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
219 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
78 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
72 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
177 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
106 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
122 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
79 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
75 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
0 votes
1 answer
235 views

I started getting this error, and I can't figure out why. I have attached a modelContainer to my main WindowGroup, and I have other views that use the @Query property and they work fine, but for some ...
Neglected Sanity's user avatar

15 30 50 per page
1
2 3 4 5
54