Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/notification based observation #41

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

marshallxxx
Copy link
Contributor

@marshallxxx marshallxxx commented Jul 28, 2018

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.

@marshallxxx marshallxxx force-pushed the feature/notificationBasedObservation branch from 4bbed87 to ec4087a Compare July 28, 2018 12:37
@ashfurrow ashfurrow requested a review from a team July 28, 2018 14:50
@freak4pc
Copy link
Member

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.

Example/Podfile Outdated
@@ -3,8 +3,8 @@ source 'https://github.com/CocoaPods/Specs.git'
use_frameworks!

target 'RxCoreData_Example' do
pod 'RxSwift', '~> 4.0'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain the version bump here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CocoaPods will not be able to resolve RxSwift dependency, as Podfile requires version ~> 4.0.0, while RxCoreData.podspec specifies ~> 4.2.0

@bobgodwinx
Copy link
Member

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

@marshallxxx
Copy link
Contributor Author

@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
Copy link
Member

bobgodwinx commented Sep 19, 2018

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

@bobgodwinx bobgodwinx self-assigned this May 29, 2019
Copy link
Member

@bobgodwinx bobgodwinx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @marshallxxx Sorry we totally forget the PR. I reviewed it and I think it's great. I like the idea of Notification based change sets. Are you willing to clean it up and rebase to the current master? If you don't have time I can pick it up myself. But it would great if you just rebase the changes. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants