PersistentModel
An interface that enables SwiftData to manage a Swift class as a stored model.
Declaration
protocol PersistentModel : AnyObject, Observable, Hashable, Identifiable, SendableMetatypeMentioned in
Topics
Creating a persistent model
Identifying the model instance
Accessing a value by key path
getValue(forKey:)getValue(forKey:)getValue(forKey:)getValue(forKey:)getValue(forKey:)getTransformableValue(forKey:)
Modifying a value by key path
setValue(forKey:to:)setValue(forKey:to:)setValue(forKey:to:)setValue(forKey:to:)setValue(forKey:to:)setTransformableValue(forKey:to:)