NSManagedObject how it works as ObservableObject?

Hi,


I'm trying to understand what does it mean that NSManagedObject is an ObservableObject, but I have not being able to find out.


My database is synchronize in the background and I want to know when an attribute of an NSManagedObject changes. I could still use the NotificationCenter, but I wonder what can I do with an ObservableObject.


Any idea ? Any tips ?


I haven't found any useful information anywhere.



Thank you

Replies

What I found out (for now).


I have to call objectWillChange.send() manually.


If the NSManagedObject is refreshed, for example because a background thread update it, I can not detect this change, so no object will change is called.


Then, I will have to listen to the regular did save notification :/


I'd have wanted something a little bit more automatic.