File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,13 +2,13 @@ import Combine
22import CoreData
33import MSLFoundation
44
5- protocol ModelConvertible {
5+ public protocol ModelConvertible {
66 associatedtype Model : Any
77 func toModel( ) -> Model
88}
99
1010/// Wraps NSFetchedResultsController and converts the delegate callback methods into a publisher (stream)
11- final class CoreDataPublisher <
11+ public final class CoreDataPublisher <
1212 EntityType: ModelConvertible & NSFetchRequestResult
1313> : NSObject , NSFetchedResultsControllerDelegate , Publishing {
1414 private( set) var fetchedRequestController : NSFetchedResultsController < EntityType >
@@ -44,7 +44,7 @@ final class CoreDataPublisher<
4444 }
4545 }
4646
47- func controllerDidChangeContent( _ controller: NSFetchedResultsController < NSFetchRequestResult > ) {
47+ public func controllerDidChangeContent( _ controller: NSFetchedResultsController < NSFetchRequestResult > ) {
4848 guard let controller = controller as? NSFetchedResultsController < EntityType > else { return }
4949 self . emitObjects ( for: controller)
5050 }
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ func buildDataStore() -> DataStore<[MySharedModel]> {
4646 cacheName : nil
4747 )
4848
49- let publisher = DataStorePublisher < MyEntity> (
49+ let publisher = CoreDataPublisher < MyEntity> (
5050 fetchedRequestController : controller
5151 )
5252
You can’t perform that action at this time.
0 commit comments