Type Method

mergeChangesFromRemoteContextSave:intoContexts:

Handles changes from other processes or from a serialized state.

Declaration

+ (void)mergeChangesFromRemoteContextSave:(NSDictionary *)changeNotificationData intoContexts:(NSArray<NSManagedObjectContext *> *)contexts;

Discussion

This method more efficiently merges changes into multiple contexts as well as nested contexts. The dictionary keys should be one or more from an NSManagedObjectContextObjectsDidChangeNotification: NSInsertedObjectsKey, NSUpdatedObjectsKey, NSDeletedObjectsKey. The values should be an NSArray of either NSManagedObjectID or NSURL objects conforming to valid results from URIRepresentation.

See Also

Managing Concurrency

automaticallyMergesChangesFromParent

A Boolean value that indicates whether the context automatically merges changes saved to its persistent store coordinator or parent context.

concurrencyType

The concurrency type for the context.

queryGenerationToken

Returns the token associated with the query generation currently in use by this context.

mergePolicy

The merge policy of the context.

transactionAuthor

The author for the context that is used as an identifier in persistent history transactions.

- mergeChangesFromContextDidSaveNotification:

Merges the changes specified in a given notification.

- setQueryGenerationFromToken:error:

Sets the query generation this context should use.

NSManagedObjectContextConcurrencyType

Constants to indicate the concurrency pattern with which a context will be used.

NSManagedObjectContextQueryGenerationKey

Constant used to reference the query generation token.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software