I have a Mac application using NSPersistentDocument. I want to be notified when objects are deleted in order to save this information using Core Data. Therefore, I am listening to NSManagedObjectContextObjectsDidChangeNotification. Often it is called instantly when objects are deleted, but sometimes it is called only after saving a permanent document with all deleted objects that were not previously notified. Since I want the user to directly export all existing objects (and not deleted ones), what do I need to do to instantly receive notification of deletion of information, or do I need to use it differently?
source share