One Logo Pool Ball
CoreData · IOS API REFERENCE

NSManagedObjectContext.ObjectsDidChangeMessage

struct · iOS 27.0+ · SDK 27.1

struct ObjectsDidChangeMessage

Posted when objects in a main queue context change (inserted, updated, deleted, refreshed, or invalidated). Only use this message type for contexts with `NSMainQueueConcurrencyType`.

Members (10)

static · iOS 27.0+

makeMessage

TypeScript
static makeMessage(notification: _Foundation_Notification): Promise<(NSManagedObjectContext_ObjectsDidChangeMessage) | null>
Swift declaration
@MainActor static func makeMessage(_ notification: Notification) -> NSManagedObjectContext.ObjectsDidChangeMessage?

Converts a posted notification into this main actor message type for any observers. To implement this method in your own `MainActorMessage` conformance, retrieve values from the ``Notification``'s ``Notification/userInfo`` and set them as properties on the message. - Parameter notification: The posted ``Notification``. - Returns: The converted `MainActorMessage` or `nil` if conversion is not possible.

get · iOS 27.0+

invalidated

TypeScript
get invalidated(): Array<NSManagedObject>
Swift declaration
var invalidated: Set<NSManagedObject> { get }

Objects that were invalidated.

get · iOS 27.0+

invalidatedAll

TypeScript
get invalidatedAll(): (boolean) | null
Swift declaration
let invalidatedAll: Bool?

True if all objects in the context were invalidated.

static · iOS 27.0+

makeNotification

TypeScript
static makeNotification(message: NSManagedObjectContext_ObjectsDidChangeMessage): Promise<_Foundation_Notification>
Swift declaration
@MainActor static func makeNotification(_ message: NSManagedObjectContext.ObjectsDidChangeMessage) -> Notification

Converts a posted main actor message into a notification for any observers. To implement this method in your own `MainActorMessage` conformance, use the properties defined by the message to populate the ``Notification``'s ``Notification/userInfo``. - Parameters: - message: The posted `MainActorMessage`. - Returns: The converted ``Notification``.

get · iOS 27.0+

name

TypeScript
static get nameValue(): _Foundation_NSNotification_Name
Swift declaration
static let name: Notification.Name

A optional name corresponding to this type, used to interoperate with notification posters and observers.

get · iOS 27.0+

context

TypeScript
get context(): NSManagedObjectContext
Swift declaration
let context: NSManagedObjectContext
get · iOS 27.0+

deleted

TypeScript
get deleted(): Array<NSManagedObject>
Swift declaration
var deleted: Set<NSManagedObject> { get }

Objects that were deleted.

get · iOS 27.0+

updated

TypeScript
get updated(): Array<NSManagedObject>
Swift declaration
var updated: Set<NSManagedObject> { get }

Objects that were updated.

get · iOS 27.0+

inserted

TypeScript
get inserted(): Array<NSManagedObject>
Swift declaration
var inserted: Set<NSManagedObject> { get }

Objects that were inserted.

get · iOS 27.0+

refreshed

TypeScript
get refreshed(): Array<NSManagedObject>
Swift declaration
var refreshed: Set<NSManagedObject> { get }

Objects that were refreshed.

Skipped declarations

No declarations were skipped in this snapshot.

All CoreData types →