SwiftData migration crashing with default value
Doing light migration, using default value, rather than optional value for new param does not seems to work and keeps crashing.
I recall an Apple SwiftData migration guide, but it seems to be gone, so I could not find any mention regarding this.
Need help updating my modelContext in SwiftData
I am trying to create an iOS app where when I scan a product, information about it comes up. When I scan a product, I want it to be stored using SwiftData and displayed in my History page. For some reason, whatever I have tried isn’t working.
SwiftData not updating after adding new element
I have a Workout that has an inverse RelationShip with Exercise:
SwiftData not updating after adding new element
I have a Workout that has an inverse RelationShip with Exercise:
SwiftData not updating after adding new element
I have a Workout that has an inverse RelationShip with Exercise:
How to Duplicate a SwiftData object
I have a SwiftData model called Workout that contains a array of Exercise Model which itself contains an array of Sets Model,
SwiftData crashes with EXC_BREAKPOINT on decoding struct property
myStruct
is a nested, Codable struct that matches some confidential JSON. No enum
in there. Why does my app crash with EXC_BREAKPOINT
on saving and access to myStruct
?
fetchCount works but fetch doesn’t
I am writing a function in my database object that can read from the database.
SwiftData deleting model with Predicate
I’m seeing unusual behaviour in SwiftData when selectively deleting models using a predicate with try modelContext.delete(model: where:)
. I have an easy workaround, but struggling to see why it works.
How to create a custom environment value with @Entry that uses a SwiftData’s PersistentModel type?
Let’s suppose we have this simple SwiftData model.