One Logo Pool Ball
SwiftData · IOS API REFERENCE

ModelActor

protocol · iOS 17.0+ · SDK 27.1

protocol ModelActor : Actor

An interface for providing mutually-exclusive access to the attributes of a conforming model.

Members (1)

get · iOS 17.0+

unownedExecutor

Swift declaration
nonisolated var unownedExecutor: UnownedSerialExecutor { get }

The optimized, unonwned reference to the model actor's executor.

Skipped declarations

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

ModelActor.modelContext

The iOS SDK compiler rejected this binding: actor-isolated property 'modelContext' can not be referenced from a nonisolated context

ModelActor.subscript(_:as:)

Passing a Swift type itself is not supported.

All SwiftData types →