modo-studio / SugarRecord

CoreData/Realm sweet wrapper written in Swift
MIT License
2.11k stars 223 forks source link

Add support for RequestObservable in MacOS 10.12+ #338

Closed jmartinesp closed 7 years ago

jmartinesp commented 7 years ago

What

RequestObservable is compatible with MacOS since version 10.12 with a couple of modifications.

Context

Right now, RequestObservable can only be used on iOS platform since the API of CoreData on MacOS wasn't really up to date. Since MacOS 10.12, the underlying NSFetchedResultsControllerDelegate can also be used, so there shouldn't be any reasons to not support this now.

Proposal

Modify the existing code to remove #if os(iOS) and make RequestObservable compatible with MacOS 10.12+. I'll link a PR soon.