RxSwiftCommunity / RxCoreData

RxSwift extensions for Core Data
MIT License
164 stars 68 forks source link

Feature/notification based observation #41

Open marshallxxx opened 6 years ago

marshallxxx commented 6 years ago

Add notification based NSManagedObjectContext change observation.

This adds two extra reactive extension to NSManagedObjectContext:

  1. Observable for any context changes
  2. Observable for object change in context

This would allow us later to create an observable with NSFetchRequest which will be notification based instead of NSFetchedResultsController. Benefits would be that every time a relationship of a type is changed we can trigger next value.

freak4pc commented 6 years ago

This is a really large change, and I don't use Core Data enough to review it. I'm wondering if there's any way to split this into smaller PRs, or would you say this is a singular feature?

Thanks, Shai.

bobgodwinx commented 6 years ago

@freak4pc I will give a look on Monday. However @marshallxxx it looks promising. 👍🏿

marshallxxx commented 6 years ago

@freak4pc agree, it looks quite large. But mainly it's addition of ManagedObjectContextNotificationObserver.

I've moved few things around, like NSManagedObjectContext+Persistable 😬, which adds extra changes.

bobgodwinx commented 5 years ago

@marshallxxx Can you re-base this to use the new RxSwift 4.3.1 Thanks