I am using SwiftData in my app, and I’ve a Tracker
mannequin with two variables: title
of sort String
and trackerType
of sort TrackerType
, which is one other mannequin. Retrieving title
information from the Tracker
works high-quality, however making an attempt to learn trackerType
leads to a crash with the error:
EXC_BREAKPOINT (code=1, subcode=0x101e8303c).
This is my Tracker Mannequin:
@Mannequin
class Tracker {
var title: String
var trackerType: [TrackerType]
init(title: String, trackerType: [TrackerType]) {
self.title = title
self.trackerType = trackerType
}
}
@Mannequin
class TrackerType {
var sort: String
var standing: Bool
init(sort: String, standing: Bool) {
self.sort = sort
self.standing = standing
}
}
And the crash outcome snippest:
I do not perceive what could possibly be the difficulty. I tried to create the mannequin with dummy information domestically in my utility.