One Logo Pool Ball
CoreData · IOS API REFERENCE

NSManagedObjectContext.DidSaveMessage

struct · iOS 27.0+ · SDK 27.1

struct DidSaveMessage

Posted after a main queue context saves. Only use this message type for contexts with `NSMainQueueConcurrencyType`.

Members (9)

static · iOS 27.0+

makeMessage

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

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+

historyToken

TypeScript
get historyToken(): (NSPersistentHistoryToken) | null
Swift declaration
let historyToken: NSPersistentHistoryToken?
get · iOS 27.0+

queryGeneration

TypeScript
get queryGeneration(): (NSQueryGenerationToken) | null
Swift declaration
let queryGeneration: NSQueryGenerationToken?

Query generation token after the save.

static · iOS 27.0+

makeNotification

TypeScript
static makeNotification(message: NSManagedObjectContext_DidSaveMessage): Promise<_Foundation_Notification>
Swift declaration
@MainActor static func makeNotification(_ message: NSManagedObjectContext.DidSaveMessage) -> 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 }

Managed objects that were deleted during this save.

get · iOS 27.0+

updated

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

Managed objects that were updated during this save.

get · iOS 27.0+

inserted

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

Managed objects that were inserted during this save.

Skipped declarations

No declarations were skipped in this snapshot.

All CoreData types →