Declared in NSManagedObjectContext+MagicalSaves.h

Tasks

Instance Methods

MR_save

- (void)MR_save
Discussion

Replaced by \MR_saveToPersistentStoreAndWait \deprecated

Declared In

NSManagedObjectContext+MagicalSaves.h

MR_saveInBackgroundCompletion:

Asynchronously save changes in the current context and it’s parent

- (void)MR_saveInBackgroundCompletion:(void ( ^ ) ( void ))completion

Parameters

completion

Completion block that is called after the save has completed. Always called on the main queue. \deprecated

Declared In

NSManagedObjectContext+MagicalSaves.h

MR_saveInBackgroundErrorHandler:

Asynchronously save changes in the current context and it’s parent

- (void)MR_saveInBackgroundErrorHandler:(void ( ^ ) ( NSError *error ))errorCallback

Parameters

errorCallback

Block that is called if an error is encountered while saving. Always called on the main thread. \deprecated

Declared In

NSManagedObjectContext+MagicalSaves.h

MR_saveInBackgroundErrorHandler:completion:

Asynchronously save changes in the current context and it’s parent

- (void)MR_saveInBackgroundErrorHandler:(void ( ^ ) ( NSError *error ))errorCallback completion:(void ( ^ ) ( void ))completion

Parameters

errorCallback

Block that is called if an error is encountered while saving. Always called on the main thread.

completion

Completion block that is called after the save has completed. Always called on the main queue. \deprecated

Declared In

NSManagedObjectContext+MagicalSaves.h

MR_saveNestedContexts

- (void)MR_saveNestedContexts
Discussion

Replaced by \MR_saveToPersistentStoreWithCompletion: \deprecated

Declared In

NSManagedObjectContext+MagicalSaves.h

MR_saveNestedContextsErrorHandler:

- (void)MR_saveNestedContextsErrorHandler:(void ( ^ ) ( NSError *error ))errorCallback
Discussion

Replaced by \MR_saveToPersistentStoreWithCompletion: \deprecated

Parameters

errorCallback

Block that is called if an error is encountered while saving. Always called on the main thread.

Declared In

NSManagedObjectContext+MagicalSaves.h

MR_saveNestedContextsErrorHandler:completion:

- (void)MR_saveNestedContextsErrorHandler:(void ( ^ ) ( NSError *error ))errorCallback completion:(void ( ^ ) ( void ))completion
Discussion

Replaced by \MR_saveToPersistentStoreWithCompletion: \deprecated

Parameters

errorCallback

Block that is called if an error is encountered while saving. Always called on the main thread.

completion

Completion block that is called after the save has completed. Always called on the main queue.

Declared In

NSManagedObjectContext+MagicalSaves.h

MR_saveOnlySelfAndWait

- (void)MR_saveOnlySelfAndWait
Discussion

Executes a save on the current context’s dispatch queue. This method only saves the current context, and the parent of the current context if one is set. The method will not return until the save is complete.

Declared In

NSManagedObjectContext+MagicalSaves.h

MR_saveOnlySelfWithCompletion:

- (void)MR_saveOnlySelfWithCompletion:(MRSaveCompletionHandler)completion
Discussion

Executes a save on the current context’s dispatch queue asynchronously. This method only saves the current context, and the parent of the current context if one is set. The completion block will always be called on the main queue.

Parameters

completion

Completion block that is called after the save has completed. The block is passed a success state as a BOOL and an NSError instance if an error occurs. Always called on the main queue.

Declared In

NSManagedObjectContext+MagicalSaves.h

MR_saveToPersistentStoreAndWait

- (void)MR_saveToPersistentStoreAndWait
Discussion

Executes saves on the current context, and any ancestors, until the changes have been persisted to the assigned persistent store. The method will not return until the save is complete.

Declared In

NSManagedObjectContext+MagicalSaves.h

MR_saveToPersistentStoreWithCompletion:

- (void)MR_saveToPersistentStoreWithCompletion:(MRSaveCompletionHandler)completion
Discussion

Executes asynchronous saves on the current context, and any ancestors, until the changes have been persisted to the assigned persistent store. The completion block will always be called on the main queue.

Parameters

completion

Completion block that is called after the save has completed. The block is passed a success state as a BOOL and an NSError instance if an error occurs. Always called on the main queue.

Declared In

NSManagedObjectContext+MagicalSaves.h

MR_saveWithErrorCallback:

Synchronously save changes in the current context all the way back to the persistent store

- (void)MR_saveWithErrorCallback:(void ( ^ ) ( NSError *error ))errorCallback

Parameters

errorCallback

Block that is called if an error is encountered while saving. Always called on the main thread. \deprecated

Declared In

NSManagedObjectContext+MagicalSaves.h

MR_saveWithOptions:completion:

- (void)MR_saveWithOptions:(MRSaveContextOptions)mask completion:(MRSaveCompletionHandler)completion
Discussion

All other save methods are conveniences to this method.

Parameters

mask

bitmasked options for the save process

completion

Completion block that is called after the save has completed. The block is passed a success state as a BOOL and an NSError instance if an error occurs. Always called on the main queue.

Declared In

NSManagedObjectContext+MagicalSaves.h