One Logo Pool Ball
SwiftData · IOS API REFERENCE

PersistentModel

protocol · iOS 17.0+ · SDK 27.1

protocol PersistentModel : AnyObject, Observable, Hashable, Identifiable, SendableMetatype

An interface that enables SwiftData to manage a Swift class as a stored model.

Members (5)

get · iOS 17.0+

persistentModelID

Swift declaration
var persistentModelID: PersistentIdentifier { get }
get · iOS 17.0+

hasChanges

Swift declaration
var hasChanges: Bool { get }
get · iOS 17.0+

modelContext

Swift declaration
var modelContext: ModelContext? { get }
get · iOS 17.0+

id

Swift declaration
var id: PersistentIdentifier { get }
get · iOS 17.0+

isDeleted

Swift declaration
var isDeleted: Bool { get }

Skipped declarations

13 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

PersistentModel.createBackingData()

This protocol needs associated types that cannot yet cross the bridge.

PersistentModel.getValue(forKey:)

This protocol needs associated types that cannot yet cross the bridge.

PersistentModel.getValue(forKey:)

This protocol needs associated types that cannot yet cross the bridge.

PersistentModel.getValue(forKey:)

This protocol needs associated types that cannot yet cross the bridge.

PersistentModel.getValue(forKey:)

This protocol needs associated types that cannot yet cross the bridge.

PersistentModel.getValue(forKey:)

This protocol needs associated types that cannot yet cross the bridge.

PersistentModel.getTransformableValue(forKey:)

This protocol needs associated types that cannot yet cross the bridge.

PersistentModel.setValue(forKey:to:)

This protocol needs associated types that cannot yet cross the bridge.

PersistentModel.setValue(forKey:to:)

This protocol needs associated types that cannot yet cross the bridge.

PersistentModel.setValue(forKey:to:)

This protocol needs associated types that cannot yet cross the bridge.

PersistentModel.setValue(forKey:to:)

This protocol needs associated types that cannot yet cross the bridge.

PersistentModel.setValue(forKey:to:)

This protocol needs associated types that cannot yet cross the bridge.

PersistentModel.setTransformableValue(forKey:to:)

This protocol needs associated types that cannot yet cross the bridge.

All SwiftData types →