API Differences in SwiftData in macOS 14.0

It's more difficult than it used to be to find what changed in Apple SDKs. This page is automatically generated and shows what is new in SwiftData in the macOS 14.0 SDK.

Table of Contents

Protocols

BackingData
ModelActor
ModelExecutor
PersistentModel
RelationshipCollection
SchemaMigrationPlan
SchemaProperty
SerialModelExecutor
VersionedSchema

Classes

DefaultSerialModelExecutor
ModelContainer
ModelContext
Schema
Schema
Attribute
Schema
CompositeAttribute
Schema
Entity
Schema
Relationship

Structs

FetchDescriptor
FetchResultsCollection
ModelConfiguration
SwiftDataError

Enums

MigrationStage

Typealiases

NotificationKey
public typealias RawValue = Swift.String
Swift.Array
public typealias PersistentElement = Element
Swift.Optional
public typealias PersistentElement = Wrapped.Element

Functions & Methods

DefaultSerialModelExecutor
public func asUnownedSerialExecutor() -> _Concurrency.UnownedSerialExecutor
DefaultSerialModelExecutor
public func enqueue(_ job: __owned _Concurrency.ExecutorJob)
PersistentModel
public static func == (lhs: Self, rhs: Self) -> Swift.Bool
PersistentModel
public static func createBackingData<P>() -> some SwiftData.BackingData<P> where P : SwiftData.PersistentModel
PersistentModel
public func getTransformableValue<Value>(forKey: Swift.KeyPath<Self, Value>) -> Value
PersistentModel
@_disfavoredOverload public func getValue<Value>(forKey: Swift.KeyPath<Self, Value>) -> Value where Value : Swift.Decodable
PersistentModel
public func getValue<Value>(forKey: Swift.KeyPath<Self, Value>) -> Value where Value : SwiftData.PersistentModel
PersistentModel
public func getValue<Value>(forKey: Swift.KeyPath<Self, Value?>) -> Value? where Value : SwiftData.PersistentModel
PersistentModel
public func getValue<Value, OtherModel>(forKey: Swift.KeyPath<Self, Value>) -> Value where Value : SwiftData.RelationshipCollection, OtherModel == Value.PersistentElement
PersistentModel
public func getValue<Value, OtherModel>(forKey: Swift.KeyPath<Self, Value>) -> Value where Value : Swift.Decodable, Value : SwiftData.RelationshipCollection, OtherModel == Value.PersistentElement
PersistentModel
public func hash(into hasher: inout Swift.Hasher)
PersistentModel
public func setTransformableValue<Value>(forKey: Swift.KeyPath<Self, Value>, to newValue: Value)
PersistentModel
@_disfavoredOverload public func setValue<Value>(forKey: Swift.KeyPath<Self, Value>, to newValue: Value) where Value : Swift.Encodable
PersistentModel
public func setValue<Value>(forKey: Swift.KeyPath<Self, Value>, to newValue: Value) where Value : SwiftData.PersistentModel
PersistentModel
public func setValue<Value>(forKey: Swift.KeyPath<Self, Value?>, to newValue: Value?) where Value : SwiftData.PersistentModel
PersistentModel
public func setValue<Value, OtherModel>(forKey: Swift.KeyPath<Self, Value>, to newValue: Value) where Value : SwiftData.RelationshipCollection, OtherModel == Value.PersistentElement
PersistentModel
public func setValue<Value, OtherModel>(forKey: Swift.KeyPath<Self, Value>, to newValue: Value) where Value : Swift.Encodable, Value : SwiftData.RelationshipCollection, OtherModel == Value.PersistentElement
Schema.Attribute.Option
public static func == (lhs: SwiftData.Schema.Attribute.Option, rhs: SwiftData.Schema.Attribute.Option) -> Swift.Bool
Schema.Attribute.Option
public func encode(to encoder: any Swift.Encoder) throws
Schema.Attribute.Option
public func hash(into hasher: inout Swift.Hasher)

Properties & Constants

ModelActor
public var modelContext: SwiftData.ModelContext
ModelActor
nonisolated public var unownedExecutor: _Concurrency.UnownedSerialExecutor
ModelConfiguration
public var debugDescription: Swift.String
PersistentModel
public var hasChanges: Swift.Bool
PersistentModel
public var id: SwiftData.PersistentIdentifier
PersistentModel
public var isDeleted: Swift.Bool
PersistentModel
public var modelContext: SwiftData.ModelContext?
PersistentModel
public var persistentModelID: SwiftData.PersistentIdentifier
Schema.Attribute.Option
public var debugDescription: Swift.String
Schema.Attribute.Option
public var hashValue: Swift.Int
Schema
final public var debugDescription: Swift.String
SchemaProperty
public var isAttribute: Swift.Bool
SchemaProperty
public var isOptional: Swift.Bool
SchemaProperty
public var isRelationship: Swift.Bool
SchemaProperty
public var isTransient: Swift.Bool

Conformances

DefaultSerialModelExecutor
_Concurrency.SerialExecutor
ModelConfiguration.CloudKitDatabase
Swift.Sendable
ModelConfiguration.GroupContainer
Swift.Sendable
ModelConfiguration
Swift.CustomDebugStringConvertible
ModelConfiguration
Swift.Sendable
ModelContext.NotificationKey
Swift.Equatable
ModelContext.NotificationKey
Swift.Hashable
ModelContext.NotificationKey
Swift.RawRepresentable
Schema.Attribute
@unchecked Swift.Sendable
Schema.Attribute.Option
Swift.Codable
Schema.Attribute.Option
Swift.CustomDebugStringConvertible
Schema.Attribute.Option
Swift.Hashable
Schema.Attribute.Option
Swift.Sendable
Schema.CompositeAttribute
@unchecked Swift.Sendable
Schema.Entity
@unchecked Swift.Sendable
Schema.Relationship
@unchecked Swift.Sendable
Schema.Relationship.DeleteRule
Swift.Equatable
Schema.Relationship.DeleteRule
Swift.Hashable
Schema.Relationship.DeleteRule
Swift.RawRepresentable
Schema
Swift.CustomDebugStringConvertible
Schema
Swift.Sendable
Schema.Version
Swift.Sendable
Swift.Array
SwiftData.RelationshipCollection
Swift.Optional
SwiftData.RelationshipCollection

Initializers

Schema.Attribute.Option
public init(from decoder: any Swift.Decoder) throws