From 82c8683118055b973c523e217d9f6453aa2886d7 Mon Sep 17 00:00:00 2001 From: Loki Date: Mon, 23 Apr 2018 11:12:39 +0300 Subject: [PATCH 01/24] RxTableViewRealmSource +columnId --- Pod/Classes/RxTableViewRealmDataSource.swift | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Pod/Classes/RxTableViewRealmDataSource.swift b/Pod/Classes/RxTableViewRealmDataSource.swift index d2da35c..3037bb0 100644 --- a/Pod/Classes/RxTableViewRealmDataSource.swift +++ b/Pod/Classes/RxTableViewRealmDataSource.swift @@ -121,7 +121,7 @@ import RxRealm import Cocoa - public typealias TableCellFactory = (RxTableViewRealmDataSource, NSTableView, Int, E) -> NSTableCellView + public typealias TableCellFactory = (RxTableViewRealmDataSource, NSTableView, Int, String?, E) -> NSTableCellView public typealias TableCellConfig = (CellType, Int, E) -> Void open class RxTableViewRealmDataSource: NSObject, NSTableViewDataSource, NSTableViewDelegate { @@ -151,7 +151,7 @@ import RxRealm public init(cellIdentifier: String, cellType: CellType.Type, cellConfig: @escaping TableCellConfig) where CellType: NSTableCellView { self.cellIdentifier = cellIdentifier - self.cellFactory = { ds, tv, row, model in + self.cellFactory = { ds, tv, row, columnId, model in let cell = tv.makeView(withIdentifier: NSUserInterfaceItemIdentifier(rawValue: cellIdentifier), owner: tv) as! CellType cellConfig(cell, row, model) return cell @@ -164,7 +164,8 @@ import RxRealm } public func tableView(_ tableView: NSTableView, viewFor tableColumn: NSTableColumn?, row: Int) -> NSView? { - return cellFactory(self, tableView, row, items![row]) + let columnId = tableColumn?.identifier.rawValue + return cellFactory(self, tableView, row, columnId, items![row]) } // MARK: - Proxy unimplemented data source and delegate methods From 68b9f4c86f40ae3281187d80d09c7351a2b36515 Mon Sep 17 00:00:00 2001 From: Loki Date: Mon, 23 Apr 2018 11:20:55 +0300 Subject: [PATCH 02/24] columnId fixes --- .../RxRealmDataSources_MacExample/TableViewController.swift | 2 +- Pod/Classes/RxTableViewRealmDataSource.swift | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Example/RxRealmDataSources_MacExample/TableViewController.swift b/Example/RxRealmDataSources_MacExample/TableViewController.swift index bf93a69..424ce68 100644 --- a/Example/RxRealmDataSources_MacExample/TableViewController.swift +++ b/Example/RxRealmDataSources_MacExample/TableViewController.swift @@ -25,7 +25,7 @@ class TableViewController: NSViewController { super.viewDidLoad() // create data source - let dataSource = RxTableViewRealmDataSource(cellIdentifier: "Cell", cellType: NSTableCellView.self) {cell, row, lap in + let dataSource = RxTableViewRealmDataSource(cellIdentifier: "Cell", cellType: NSTableCellView.self) {cell, row, columnId, lap in cell.textField!.stringValue = "\(lap.text)" } dataSource.delegate = self diff --git a/Pod/Classes/RxTableViewRealmDataSource.swift b/Pod/Classes/RxTableViewRealmDataSource.swift index 3037bb0..313a2f4 100644 --- a/Pod/Classes/RxTableViewRealmDataSource.swift +++ b/Pod/Classes/RxTableViewRealmDataSource.swift @@ -122,7 +122,7 @@ import RxRealm import Cocoa public typealias TableCellFactory = (RxTableViewRealmDataSource, NSTableView, Int, String?, E) -> NSTableCellView - public typealias TableCellConfig = (CellType, Int, E) -> Void + public typealias TableCellConfig = (CellType, Int, String?, E) -> Void open class RxTableViewRealmDataSource: NSObject, NSTableViewDataSource, NSTableViewDelegate { @@ -153,7 +153,7 @@ import RxRealm self.cellIdentifier = cellIdentifier self.cellFactory = { ds, tv, row, columnId, model in let cell = tv.makeView(withIdentifier: NSUserInterfaceItemIdentifier(rawValue: cellIdentifier), owner: tv) as! CellType - cellConfig(cell, row, model) + cellConfig(cell, row, columnId, model) return cell } } From 843e7995e8ddf36b8444f85c0ba6b630b058693f Mon Sep 17 00:00:00 2001 From: Loki Date: Mon, 23 Apr 2018 15:35:57 +0300 Subject: [PATCH 03/24] RxOutlineViewRealmDataSource --- .../RxOutlineViewRealmDataSource.swift | 136 ++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 Pod/Classes/RxOutlineViewRealmDataSource.swift diff --git a/Pod/Classes/RxOutlineViewRealmDataSource.swift b/Pod/Classes/RxOutlineViewRealmDataSource.swift new file mode 100644 index 0000000..105c9f2 --- /dev/null +++ b/Pod/Classes/RxOutlineViewRealmDataSource.swift @@ -0,0 +1,136 @@ +// +// RxOutlineViewRealmDataSource.swift +// Pods-Demo-RxRealmDataSources_MacExample +// +// Created by Loki on 4/23/18. +// + +import Foundation +import RealmSwift +import RxSwift +import RxCocoa +import RxRealm + +open class RxOutlineViewRealmDataItem : Object { + var childrenCount : Int { assert(false, "implement me"); return 0 } + var isExpandable : Bool { return childrenCount > 0} + func childAt(idx: Int) -> RxOutlineViewRealmDataItem? { assert(false, "implement me"); return nil } +} + +#if os(OSX) +import Cocoa + +public typealias TableCellFactory = (RxOutlineViewRealmDataSource, NSOutlineView, Int, String?, E) -> NSTableCellView +public typealias TableCellConfig = (CellType, Int, String?, E) -> Void + +open class RxOutlineViewRealmDataSource: NSObject, NSOutlineViewDataSource, NSOutlineViewDelegate { + + private var items: AnyRealmCollection? + + // MARK: - Configuration + + public var tableView: NSTableView? + public var animated = true + public var rowAnimations = ( + insert: NSTableView.AnimationOptions.effectFade, + update: NSTableView.AnimationOptions.effectFade, + delete: NSTableView.AnimationOptions.effectFade) + + public weak var delegate: NSTableViewDelegate? + public weak var dataSource: NSTableViewDataSource? + + // MARK: - Init + public let cellIdentifier: String + public let cellFactory: TableCellFactory + + public init(cellIdentifier: String, cellFactory: @escaping TableCellFactory) { + self.cellIdentifier = cellIdentifier + self.cellFactory = cellFactory + } + + public init(cellIdentifier: String, cellType: CellType.Type, cellConfig: @escaping TableCellConfig) where CellType: NSTableCellView { + self.cellIdentifier = cellIdentifier + self.cellFactory = { ds, tv, row, columnId, model in + let cell = tv.makeView(withIdentifier: NSUserInterfaceItemIdentifier(rawValue: cellIdentifier), owner: tv) as! CellType + cellConfig(cell, row, columnId, model) + return cell + } + } + + // MARK: - NSOutlineViewDataSource protocol + public func outlineView(_ outlineView: NSOutlineView, numberOfChildrenOfItem item: Any?) -> Int { + if let item = item as? RxOutlineViewRealmDataItem { + return item.childrenCount + } + + return 0 + } + + public func outlineView(_ outlineView: NSOutlineView, child index: Int, ofItem item: Any?) -> Any { + guard let item = item as? RxOutlineViewRealmDataItem else { return false } + guard let child = item.childAt(idx: index) else { return false } + + return child + + } + + public func outlineView(_ outlineView: NSOutlineView, isItemExpandable item: Any) -> Bool { + guard let item = item as? RxOutlineViewRealmDataItem else { return false } + + return item.isExpandable + } + + // MARK: - Proxy unimplemented data source and delegate methods + open override func responds(to aSelector: Selector!) -> Bool { + if RxOutlineViewRealmDataSource.instancesRespond(to: aSelector) { + return true + } else if let delegate = delegate { + return delegate.responds(to: aSelector) + } else if let dataSource = dataSource { + return dataSource.responds(to: aSelector) + } else { + return false + } + } + + open override func forwardingTarget(for aSelector: Selector!) -> Any? { + return delegate ?? dataSource + } + + // MARK: - Applying changeset to the table view + private let fromRow = {(row: Int) in return IndexPath(item: row, section: 0)} + + func applyChanges(items: AnyRealmCollection, changes: RealmChangeset?) { + if self.items == nil { + self.items = items + } + + guard let tableView = tableView else { + fatalError("You have to bind a table view to the data source.") + } + + guard animated else { + tableView.reloadData() + return + } + + guard let changes = changes else { + tableView.reloadData() + return + } + + let lastItemCount = tableView.numberOfRows + guard items.count == lastItemCount + changes.inserted.count - changes.deleted.count else { + tableView.reloadData() + return + } + + tableView.beginUpdates() + tableView.removeRows(at: IndexSet(changes.deleted), withAnimation: rowAnimations.delete) + tableView.insertRows(at: IndexSet(changes.inserted), withAnimation: rowAnimations.insert) + tableView.reloadData(forRowIndexes: IndexSet(changes.updated), columnIndexes: IndexSet([0])) + tableView.endUpdates() + } +} + +#endif From e188b8cd071a8ca8c51ecda9cf202e2f1f1c5dbc Mon Sep 17 00:00:00 2001 From: Loki Date: Mon, 23 Apr 2018 16:35:43 +0300 Subject: [PATCH 04/24] RxOutlineViewRealmDataItem WIP --- .../RxOutlineViewRealmDataSource.swift | 47 +++++++++---------- 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/Pod/Classes/RxOutlineViewRealmDataSource.swift b/Pod/Classes/RxOutlineViewRealmDataSource.swift index 105c9f2..584f5aa 100644 --- a/Pod/Classes/RxOutlineViewRealmDataSource.swift +++ b/Pod/Classes/RxOutlineViewRealmDataSource.swift @@ -12,16 +12,18 @@ import RxCocoa import RxRealm open class RxOutlineViewRealmDataItem : Object { - var childrenCount : Int { assert(false, "implement me"); return 0 } + var childrenCount : Int { get { fatalError("implement me") } } var isExpandable : Bool { return childrenCount > 0} - func childAt(idx: Int) -> RxOutlineViewRealmDataItem? { assert(false, "implement me"); return nil } + + func childAt(idx: Int) -> RxOutlineViewRealmDataItem? { fatalError("implement me") } + func getParent() -> RxOutlineViewRealmDataItem? { fatalError("implement me") } } #if os(OSX) import Cocoa -public typealias TableCellFactory = (RxOutlineViewRealmDataSource, NSOutlineView, Int, String?, E) -> NSTableCellView -public typealias TableCellConfig = (CellType, Int, String?, E) -> Void +public typealias OutlineCellFactory = (RxOutlineViewRealmDataSource, NSOutlineView, Int, String?, E) -> NSTableCellView +public typealias OutlineCellConfig = (CellType, Int, String?, E) -> Void open class RxOutlineViewRealmDataSource: NSObject, NSOutlineViewDataSource, NSOutlineViewDelegate { @@ -29,7 +31,7 @@ open class RxOutlineViewRealmDataSource: NSObject // MARK: - Configuration - public var tableView: NSTableView? + public var outlineView: NSOutlineView? public var animated = true public var rowAnimations = ( insert: NSTableView.AnimationOptions.effectFade, @@ -41,14 +43,14 @@ open class RxOutlineViewRealmDataSource: NSObject // MARK: - Init public let cellIdentifier: String - public let cellFactory: TableCellFactory + public let cellFactory: OutlineCellFactory - public init(cellIdentifier: String, cellFactory: @escaping TableCellFactory) { + public init(cellIdentifier: String, cellFactory: @escaping OutlineCellFactory) { self.cellIdentifier = cellIdentifier self.cellFactory = cellFactory } - public init(cellIdentifier: String, cellType: CellType.Type, cellConfig: @escaping TableCellConfig) where CellType: NSTableCellView { + public init(cellIdentifier: String, cellType: CellType.Type, cellConfig: @escaping OutlineCellConfig) where CellType: NSTableCellView { self.cellIdentifier = cellIdentifier self.cellFactory = { ds, tv, row, columnId, model in let cell = tv.makeView(withIdentifier: NSUserInterfaceItemIdentifier(rawValue: cellIdentifier), owner: tv) as! CellType @@ -105,31 +107,28 @@ open class RxOutlineViewRealmDataSource: NSObject self.items = items } - guard let tableView = tableView else { + guard let outlineView = outlineView else { fatalError("You have to bind a table view to the data source.") } guard animated else { - tableView.reloadData() + outlineView.reloadData() return } - guard let changes = changes else { - tableView.reloadData() - return - } +// guard let changes = changes else { +// outlineView.reloadData() +// return +// } - let lastItemCount = tableView.numberOfRows - guard items.count == lastItemCount + changes.inserted.count - changes.deleted.count else { - tableView.reloadData() - return - } + outlineView.reloadData() - tableView.beginUpdates() - tableView.removeRows(at: IndexSet(changes.deleted), withAnimation: rowAnimations.delete) - tableView.insertRows(at: IndexSet(changes.inserted), withAnimation: rowAnimations.insert) - tableView.reloadData(forRowIndexes: IndexSet(changes.updated), columnIndexes: IndexSet([0])) - tableView.endUpdates() + //outlineView.beginUpdates() + //outlineView.removeItems(at: IndexSet(changes.deleted), inParent: <#T##Any?#>, withAnimation: <#T##NSTableView.AnimationOptions#>) + //tableView.removeRows(at: IndexSet(changes.deleted), withAnimation: rowAnimations.delete) + //tableView.insertRows(at: IndexSet(changes.inserted), withAnimation: rowAnimations.insert) + //outlineView.reloadData(forRowIndexes: IndexSet(changes.updated), columnIndexes: IndexSet([0])) + //outlineView.endUpdates() } } From 4bb2ee649d6ccd2e93da4febd4faee58eef4d98e Mon Sep 17 00:00:00 2001 From: Loki Date: Mon, 23 Apr 2018 17:22:39 +0300 Subject: [PATCH 05/24] + OutlineViewController --- .gitignore | 1 + .../project.pbxproj | 12 ++ .../Base.lproj/Main.storyboard | 123 +++++++++++++++++- .../MenuViewController.swift | 6 +- .../OutlineViewController.swift | 33 +++++ 5 files changed, 167 insertions(+), 8 deletions(-) create mode 100644 Example/RxRealmDataSources_MacExample/OutlineViewController.swift diff --git a/.gitignore b/.gitignore index 33a6a59..985821e 100644 --- a/.gitignore +++ b/.gitignore @@ -67,3 +67,4 @@ Example/Pods # mac OS .DS_Store +/Example/Podfile.lock diff --git a/Example/RxRealmDataSources.xcodeproj/project.pbxproj b/Example/RxRealmDataSources.xcodeproj/project.pbxproj index b1fc325..f8ca920 100644 --- a/Example/RxRealmDataSources.xcodeproj/project.pbxproj +++ b/Example/RxRealmDataSources.xcodeproj/project.pbxproj @@ -31,6 +31,7 @@ 9CB0B5751DF9E9E800F947D0 /* Lap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CB0B5741DF9E9E800F947D0 /* Lap.swift */; }; 9CB0B5771DF9EA0F00F947D0 /* Timer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CB0B5761DF9EA0F00F947D0 /* Timer.swift */; }; A0F623D0059D4D5BF38B60D9 /* Pods_Demo_RxRealmDataSources_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3CAA1529C0E19B1E708B0776 /* Pods_Demo_RxRealmDataSources_Example.framework */; }; + E6063F6F208E2094004423D7 /* OutlineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6063F6E208E2094004423D7 /* OutlineViewController.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -69,6 +70,7 @@ 9CB0B5741DF9E9E800F947D0 /* Lap.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Lap.swift; sourceTree = ""; }; 9CB0B5761DF9EA0F00F947D0 /* Timer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Timer.swift; sourceTree = ""; }; BC02907133053010FAE53FD9 /* Pods-RxRealmDataSources_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RxRealmDataSources_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-RxRealmDataSources_Example/Pods-RxRealmDataSources_Example.release.xcconfig"; sourceTree = ""; }; + E6063F6E208E2094004423D7 /* OutlineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OutlineViewController.swift; sourceTree = ""; }; E709FF280BD1C0E98E09724E /* Pods-Demo-RxRealmDataSources_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Demo-RxRealmDataSources_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-Demo-RxRealmDataSources_Example/Pods-Demo-RxRealmDataSources_Example.release.xcconfig"; sourceTree = ""; }; F047F94251BA9258A7A94AEE /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; /* End PBXFileReference section */ @@ -210,6 +212,7 @@ 9C5B02E11E167A3D0009FBDE /* MenuViewController.swift */, 9C5B02E01E16791C0009FBDE /* 1. Table View Data Source */, 9C5B02EB1E16C4D40009FBDE /* 2. Collection View Data Source */, + E6063F6D208E2060004423D7 /* 3. Outline view Data Source */, ); name = "View Controllers"; sourceTree = ""; @@ -260,6 +263,14 @@ name = "2. Collection View Data Source"; sourceTree = ""; }; + E6063F6D208E2060004423D7 /* 3. Outline view Data Source */ = { + isa = PBXGroup; + children = ( + E6063F6E208E2094004423D7 /* OutlineViewController.swift */, + ); + name = "3. Outline view Data Source"; + sourceTree = ""; + }; F29E453A66420BEFA081E479 /* Pods */ = { isa = PBXGroup; children = ( @@ -528,6 +539,7 @@ buildActionMask = 2147483647; files = ( 9C5B02E81E16AB080009FBDE /* DataRandomizer.swift in Sources */, + E6063F6F208E2094004423D7 /* OutlineViewController.swift in Sources */, 9C5B02EA1E16AB0C0009FBDE /* Timer.swift in Sources */, 9C5B02F21E16C8270009FBDE /* CollectionItem.swift in Sources */, 9C5B02ED1E16C50F0009FBDE /* CollectionViewController.swift in Sources */, diff --git a/Example/RxRealmDataSources_MacExample/Base.lproj/Main.storyboard b/Example/RxRealmDataSources_MacExample/Base.lproj/Main.storyboard index 4915a22..542cae1 100644 --- a/Example/RxRealmDataSources_MacExample/Base.lproj/Main.storyboard +++ b/Example/RxRealmDataSources_MacExample/Base.lproj/Main.storyboard @@ -1,8 +1,8 @@ - + - + @@ -669,6 +669,9 @@ + + + @@ -689,8 +692,12 @@ + + + + @@ -720,7 +727,7 @@ - + @@ -808,7 +815,7 @@ - + @@ -887,7 +894,7 @@ - + @@ -921,5 +928,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Example/RxRealmDataSources_MacExample/MenuViewController.swift b/Example/RxRealmDataSources_MacExample/MenuViewController.swift index cd572e4..1824a59 100644 --- a/Example/RxRealmDataSources_MacExample/MenuViewController.swift +++ b/Example/RxRealmDataSources_MacExample/MenuViewController.swift @@ -11,8 +11,8 @@ import Cocoa class MenuViewController: NSViewController { @IBOutlet var tableView: NSTableView! - let menuItems = ["Table Demo", "Collection Demo"] - let targetNames = ["TableViewController", "CollectionViewController"] + let menuItems = ["Table Demo", "Collection Demo", "Tree Demo"] + let targetNames = ["TableViewController", "CollectionViewController", "OutlineViewController"] override func viewWillAppear() { super.viewWillAppear() @@ -22,7 +22,7 @@ class MenuViewController: NSViewController { extension MenuViewController: NSTableViewDataSource { func numberOfRows(in tableView: NSTableView) -> Int { - return 2 + return 3 } func tableView(_ tableView: NSTableView, heightOfRow row: Int) -> CGFloat { diff --git a/Example/RxRealmDataSources_MacExample/OutlineViewController.swift b/Example/RxRealmDataSources_MacExample/OutlineViewController.swift new file mode 100644 index 0000000..d1305de --- /dev/null +++ b/Example/RxRealmDataSources_MacExample/OutlineViewController.swift @@ -0,0 +1,33 @@ +// +// OutlineViewController.swift +// RxRealmDataSources_MacExample +// +// Created by Loki on 4/23/18. +// Copyright © 2018 CocoaPods. All rights reserved. +// + +import Cocoa +import RealmSwift + +import RxSwift +import RxCocoa +import RxRealm +import RxRealmDataSources + +class OutlineViewController: NSViewController { + + private let bag = DisposeBag() + private let data = DataRandomizer() + + override func viewDidLoad() { + super.viewDidLoad() + + + } +} +/* +extension TableViewController: NSTableViewDelegate { + func tableView(_ tableView: NSTableView, heightOfRow row: Int) -> CGFloat { + return 40.0 + } +}*/ From f37922b120f62f06a92de92cacf306bf7fdc184b Mon Sep 17 00:00:00 2001 From: Loki Date: Mon, 23 Apr 2018 17:23:06 +0300 Subject: [PATCH 06/24] ignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 985821e..3e2205e 100644 --- a/.gitignore +++ b/.gitignore @@ -68,3 +68,4 @@ Example/Pods # mac OS .DS_Store /Example/Podfile.lock +/Example/RxRealmDataSources.xcworkspace/xcshareddata From 1442c21d198961e7df024961e0e0bb16329db502 Mon Sep 17 00:00:00 2001 From: Loki Date: Mon, 23 Apr 2018 19:56:02 +0300 Subject: [PATCH 07/24] OutlineView WIP --- .../project.pbxproj | 4 ++ Example/RxRealmDataSources/TreeItem.swift | 43 ++++++++++++++ .../Base.lproj/Main.storyboard | 9 ++- .../OutlineViewController.swift | 57 +++++++++++++++++-- Pod/Classes/Reactive+RxRealmDataSources.swift | 16 ++++++ Pod/Classes/RxOutlineViewRealmDataItem.swift | 14 +++++ .../RxOutlineViewRealmDataSource.swift | 42 ++++++++------ 7 files changed, 161 insertions(+), 24 deletions(-) create mode 100644 Example/RxRealmDataSources/TreeItem.swift create mode 100644 Pod/Classes/RxOutlineViewRealmDataItem.swift diff --git a/Example/RxRealmDataSources.xcodeproj/project.pbxproj b/Example/RxRealmDataSources.xcodeproj/project.pbxproj index f8ca920..fdc0da1 100644 --- a/Example/RxRealmDataSources.xcodeproj/project.pbxproj +++ b/Example/RxRealmDataSources.xcodeproj/project.pbxproj @@ -32,6 +32,7 @@ 9CB0B5771DF9EA0F00F947D0 /* Timer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CB0B5761DF9EA0F00F947D0 /* Timer.swift */; }; A0F623D0059D4D5BF38B60D9 /* Pods_Demo_RxRealmDataSources_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3CAA1529C0E19B1E708B0776 /* Pods_Demo_RxRealmDataSources_Example.framework */; }; E6063F6F208E2094004423D7 /* OutlineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6063F6E208E2094004423D7 /* OutlineViewController.swift */; }; + E6063F72208E256F004423D7 /* TreeItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6063F70208E256F004423D7 /* TreeItem.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -71,6 +72,7 @@ 9CB0B5761DF9EA0F00F947D0 /* Timer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Timer.swift; sourceTree = ""; }; BC02907133053010FAE53FD9 /* Pods-RxRealmDataSources_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RxRealmDataSources_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-RxRealmDataSources_Example/Pods-RxRealmDataSources_Example.release.xcconfig"; sourceTree = ""; }; E6063F6E208E2094004423D7 /* OutlineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OutlineViewController.swift; sourceTree = ""; }; + E6063F70208E256F004423D7 /* TreeItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TreeItem.swift; sourceTree = ""; }; E709FF280BD1C0E98E09724E /* Pods-Demo-RxRealmDataSources_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Demo-RxRealmDataSources_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-Demo-RxRealmDataSources_Example/Pods-Demo-RxRealmDataSources_Example.release.xcconfig"; sourceTree = ""; }; F047F94251BA9258A7A94AEE /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; /* End PBXFileReference section */ @@ -249,6 +251,7 @@ children = ( 9CB0B5741DF9E9E800F947D0 /* Lap.swift */, 9CB0B5761DF9EA0F00F947D0 /* Timer.swift */, + E6063F70208E256F004423D7 /* TreeItem.swift */, ); name = "Data Entities"; path = RxRealmDataSources; @@ -546,6 +549,7 @@ 9C5B02E21E167A3D0009FBDE /* MenuViewController.swift in Sources */, 9C5B02E91E16AB0C0009FBDE /* Lap.swift in Sources */, 9C5B02D21E1678C80009FBDE /* AppDelegate.swift in Sources */, + E6063F72208E256F004423D7 /* TreeItem.swift in Sources */, 9C5B02E61E16AABA0009FBDE /* TableViewController.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/Example/RxRealmDataSources/TreeItem.swift b/Example/RxRealmDataSources/TreeItem.swift new file mode 100644 index 0000000..c853810 --- /dev/null +++ b/Example/RxRealmDataSources/TreeItem.swift @@ -0,0 +1,43 @@ +// +// TreeItem.swift +// RxRealmDataSources +// +// Created by Sergiy Vynnychenko on 4/23/18. +// Copyright © 2018 CocoaPods. All rights reserved. +// + +import Foundation +import RealmSwift +import RxRealmDataSources + +@objcMembers class TreeItem: Object, RxOutlineViewRealmDataItem { + + + + override static func primaryKey() -> String? { return "key" } + + dynamic var key : String = UUID().uuidString + dynamic var title : String = "" + dynamic var time : Double = 0 + dynamic var children = List() + dynamic var _parents = LinkingObjects(fromType: TreeItem.self, property: "children") + + + // RxOutlineViewRealmDataItem implementation + var isExpandable: Bool { return childrenCount > 0 } + var childrenCount : Int { get { return children.count } } + + func childAt(idx: Int) -> RxOutlineViewRealmDataItem? { + guard idx >= 0 else { return nil } + guard idx < children.count else { return nil } + + return children[idx] + } + + func getParent() -> RxOutlineViewRealmDataItem? { + guard _parents.count > 0 else { return nil } + + return _parents[0] + } +} + diff --git a/Example/RxRealmDataSources_MacExample/Base.lproj/Main.storyboard b/Example/RxRealmDataSources_MacExample/Base.lproj/Main.storyboard index 542cae1..dd66fee 100644 --- a/Example/RxRealmDataSources_MacExample/Base.lproj/Main.storyboard +++ b/Example/RxRealmDataSources_MacExample/Base.lproj/Main.storyboard @@ -946,7 +946,7 @@ - + @@ -959,7 +959,7 @@ - + @@ -979,7 +979,7 @@ - + @@ -1029,6 +1029,9 @@ + + + diff --git a/Example/RxRealmDataSources_MacExample/OutlineViewController.swift b/Example/RxRealmDataSources_MacExample/OutlineViewController.swift index d1305de..87a56f0 100644 --- a/Example/RxRealmDataSources_MacExample/OutlineViewController.swift +++ b/Example/RxRealmDataSources_MacExample/OutlineViewController.swift @@ -16,18 +16,65 @@ import RxRealmDataSources class OutlineViewController: NSViewController { + @IBOutlet weak var outlineView: NSOutlineView! + private let bag = DisposeBag() private let data = DataRandomizer() override func viewDidLoad() { super.viewDidLoad() + let dataSource = RxOutlineViewRealmDataSource(cellIdentifier: "Title", cellType: NSTableCellView.self) { + cell, columnId, treeItem in + + guard let columnId = columnId else { return } + + switch columnId { + case "Title": + cell.textField!.stringValue = treeItem.title + case "Time": + cell.textField!.stringValue = "\(treeItem.time)" + default: + break + } + } + dataSource.delegate = self + + let realm = try! Realm(configuration: data.config) + let items = Observable.changeset(from: realm.objects(TreeItem.self)) + .share() + + items + .bind(to: outlineView.rx.realmChanges(dataSource)) + .disposed(by: bag) + //items.subscribe(onNext: { collection, changeset in + // print("items added : \(collection)") + // }).disposed(by: bag) } + + override func viewDidAppear() { + let realm = try! Realm(configuration: data.config) + + let items = realm.objects(TreeItem.self) + + if items.count == 0 { + for i in 0...20 { + let newItem = TreeItem() + newItem.title = "Item \(i)" + newItem.time = Double(i * 60) + + try! realm.write { + realm.add(newItem) + } + } + } + } + } -/* -extension TableViewController: NSTableViewDelegate { - func tableView(_ tableView: NSTableView, heightOfRow row: Int) -> CGFloat { - return 40.0 + +extension OutlineViewController: NSOutlineViewDelegate { + func outlineView(_ outlineView: NSOutlineView, heightOfRowByItem item: Any) -> CGFloat { + return 20.0 } -}*/ +} diff --git a/Pod/Classes/Reactive+RxRealmDataSources.swift b/Pod/Classes/Reactive+RxRealmDataSources.swift index c51ca48..49ab90d 100644 --- a/Pod/Classes/Reactive+RxRealmDataSources.swift +++ b/Pod/Classes/Reactive+RxRealmDataSources.swift @@ -95,6 +95,22 @@ extension Reactive where Base: NSTableView { } } +extension Reactive where Base: NSOutlineView { + public func realmChanges(_ dataSource: RxOutlineViewRealmDataSource) + -> RealmBindObserver, RxOutlineViewRealmDataSource> { + + base.delegate = dataSource + base.dataSource = dataSource + + return RealmBindObserver(dataSource: dataSource) {ds, results, changes in + if dataSource.outlineView == nil { + dataSource.outlineView = self.base + } + ds.applyChanges(items: AnyRealmCollection(results), changes: changes) + } + } +} + extension Reactive where Base: NSCollectionView { public func realmChanges(_ dataSource: RxCollectionViewRealmDataSource) diff --git a/Pod/Classes/RxOutlineViewRealmDataItem.swift b/Pod/Classes/RxOutlineViewRealmDataItem.swift new file mode 100644 index 0000000..f639209 --- /dev/null +++ b/Pod/Classes/RxOutlineViewRealmDataItem.swift @@ -0,0 +1,14 @@ +// +// RxOutlineViewRealmDataItem.swift +// Pods +// +// Created by Loki on 4/23/18. +// + +public protocol RxOutlineViewRealmDataItem { + var childrenCount : Int { get } + var isExpandable : Bool { get } + + func childAt(idx: Int) -> RxOutlineViewRealmDataItem? + func getParent() -> RxOutlineViewRealmDataItem? +} diff --git a/Pod/Classes/RxOutlineViewRealmDataSource.swift b/Pod/Classes/RxOutlineViewRealmDataSource.swift index 584f5aa..a625b37 100644 --- a/Pod/Classes/RxOutlineViewRealmDataSource.swift +++ b/Pod/Classes/RxOutlineViewRealmDataSource.swift @@ -11,21 +11,13 @@ import RxSwift import RxCocoa import RxRealm -open class RxOutlineViewRealmDataItem : Object { - var childrenCount : Int { get { fatalError("implement me") } } - var isExpandable : Bool { return childrenCount > 0} - - func childAt(idx: Int) -> RxOutlineViewRealmDataItem? { fatalError("implement me") } - func getParent() -> RxOutlineViewRealmDataItem? { fatalError("implement me") } -} - #if os(OSX) import Cocoa -public typealias OutlineCellFactory = (RxOutlineViewRealmDataSource, NSOutlineView, Int, String?, E) -> NSTableCellView -public typealias OutlineCellConfig = (CellType, Int, String?, E) -> Void +public typealias OutlineCellFactory = (NSOutlineView, String?, E) -> NSTableCellView +public typealias OutlineCellConfig = (CellType, String?, E) -> Void -open class RxOutlineViewRealmDataSource: NSObject, NSOutlineViewDataSource, NSOutlineViewDelegate { +open class RxOutlineViewRealmDataSource: NSObject, NSOutlineViewDataSource, NSOutlineViewDelegate { private var items: AnyRealmCollection? @@ -38,8 +30,8 @@ open class RxOutlineViewRealmDataSource: NSObject update: NSTableView.AnimationOptions.effectFade, delete: NSTableView.AnimationOptions.effectFade) - public weak var delegate: NSTableViewDelegate? - public weak var dataSource: NSTableViewDataSource? + public weak var delegate: NSOutlineViewDelegate? + public weak var dataSource: NSOutlineViewDataSource? // MARK: - Init public let cellIdentifier: String @@ -52,15 +44,27 @@ open class RxOutlineViewRealmDataSource: NSObject public init(cellIdentifier: String, cellType: CellType.Type, cellConfig: @escaping OutlineCellConfig) where CellType: NSTableCellView { self.cellIdentifier = cellIdentifier - self.cellFactory = { ds, tv, row, columnId, model in - let cell = tv.makeView(withIdentifier: NSUserInterfaceItemIdentifier(rawValue: cellIdentifier), owner: tv) as! CellType - cellConfig(cell, row, columnId, model) + self.cellFactory = { ov, columnId, model in + let cell = ov.makeView(withIdentifier: NSUserInterfaceItemIdentifier(rawValue: cellIdentifier), owner: ov) as! CellType + cellConfig(cell, columnId, model) return cell } } // MARK: - NSOutlineViewDataSource protocol + public func outlineView(_ outlineView: NSOutlineView, viewFor tableColumn: NSTableColumn?, item: Any) -> NSView? { + guard let item = item as? E else { return nil } + let columnId = tableColumn?.identifier.rawValue + return cellFactory(outlineView, columnId, item) + } + public func outlineView(_ outlineView: NSOutlineView, numberOfChildrenOfItem item: Any?) -> Int { + if item == nil { + if let rootItems = items?.filter("_parents.@count = %d", 0) { + return rootItems.count + } + return 0 + } if let item = item as? RxOutlineViewRealmDataItem { return item.childrenCount } @@ -69,6 +73,12 @@ open class RxOutlineViewRealmDataSource: NSObject } public func outlineView(_ outlineView: NSOutlineView, child index: Int, ofItem item: Any?) -> Any { + if item == nil { + if let rootItems = items?.filter("_parents.@count = %d", 0) { + return rootItems[index] + } + return 0 + } guard let item = item as? RxOutlineViewRealmDataItem else { return false } guard let child = item.childAt(idx: index) else { return false } From 4bfec95d8bae25fc49ec2f355cd135ce2d98b127 Mon Sep 17 00:00:00 2001 From: Loki Date: Mon, 23 Apr 2018 20:10:23 +0300 Subject: [PATCH 08/24] OutlineView WIP --- Example/RxRealmDataSources/TreeItem.swift | 16 +++++------ .../OutlineViewController.swift | 28 +++++++++---------- .../RxOutlineViewRealmDataSource.swift | 4 +-- 3 files changed, 23 insertions(+), 25 deletions(-) diff --git a/Example/RxRealmDataSources/TreeItem.swift b/Example/RxRealmDataSources/TreeItem.swift index c853810..dbd405c 100644 --- a/Example/RxRealmDataSources/TreeItem.swift +++ b/Example/RxRealmDataSources/TreeItem.swift @@ -11,20 +11,20 @@ import RealmSwift import RxRealmDataSources @objcMembers class TreeItem: Object, RxOutlineViewRealmDataItem { - - - + override static func primaryKey() -> String? { return "key" } dynamic var key : String = UUID().uuidString dynamic var title : String = "" dynamic var time : Double = 0 - dynamic var children = List() - dynamic var _parents = LinkingObjects(fromType: TreeItem.self, property: "children") + dynamic var children = LinkingObjects(fromType: TreeItem.self, property: "parent") + dynamic var parent : TreeItem? // // RxOutlineViewRealmDataItem implementation - var isExpandable: Bool { return childrenCount > 0 } + var isExpandable: Bool { + return childrenCount > 0 + } var childrenCount : Int { get { return children.count } } func childAt(idx: Int) -> RxOutlineViewRealmDataItem? { @@ -35,9 +35,7 @@ import RxRealmDataSources } func getParent() -> RxOutlineViewRealmDataItem? { - guard _parents.count > 0 else { return nil } - - return _parents[0] + return parent } } diff --git a/Example/RxRealmDataSources_MacExample/OutlineViewController.swift b/Example/RxRealmDataSources_MacExample/OutlineViewController.swift index 87a56f0..9894f89 100644 --- a/Example/RxRealmDataSources_MacExample/OutlineViewController.swift +++ b/Example/RxRealmDataSources_MacExample/OutlineViewController.swift @@ -47,26 +47,26 @@ class OutlineViewController: NSViewController { items .bind(to: outlineView.rx.realmChanges(dataSource)) .disposed(by: bag) - - //items.subscribe(onNext: { collection, changeset in - // print("items added : \(collection)") - // }).disposed(by: bag) } override func viewDidAppear() { let realm = try! Realm(configuration: data.config) - let items = realm.objects(TreeItem.self) + let rootItem = TreeItem() + rootItem.title = "Root Item" + rootItem.time = Double(60) + try! realm.write { + realm.add(rootItem) + } - if items.count == 0 { - for i in 0...20 { - let newItem = TreeItem() - newItem.title = "Item \(i)" - newItem.time = Double(i * 60) - - try! realm.write { - realm.add(newItem) - } + for i in 0...5 { + let newItem = TreeItem() + newItem.title = "Item \(i)" + newItem.time = Double(i * 60) + newItem.parent = rootItem + + try! realm.write { + realm.add(newItem) } } } diff --git a/Pod/Classes/RxOutlineViewRealmDataSource.swift b/Pod/Classes/RxOutlineViewRealmDataSource.swift index a625b37..9ddf693 100644 --- a/Pod/Classes/RxOutlineViewRealmDataSource.swift +++ b/Pod/Classes/RxOutlineViewRealmDataSource.swift @@ -60,7 +60,7 @@ open class RxOutlineViewRealmDataSource: NSObject, NSOutlineViewDataS public func outlineView(_ outlineView: NSOutlineView, numberOfChildrenOfItem item: Any?) -> Int { if item == nil { - if let rootItems = items?.filter("_parents.@count = %d", 0) { + if let rootItems = items?.filter("parent = null", 0) { return rootItems.count } return 0 @@ -74,7 +74,7 @@ open class RxOutlineViewRealmDataSource: NSObject, NSOutlineViewDataS public func outlineView(_ outlineView: NSOutlineView, child index: Int, ofItem item: Any?) -> Any { if item == nil { - if let rootItems = items?.filter("_parents.@count = %d", 0) { + if let rootItems = items?.filter("parent = null", 0) { return rootItems[index] } return 0 From c8edcce7d0739a617e3e87f8704669d24f2ee73c Mon Sep 17 00:00:00 2001 From: Loki Date: Wed, 25 Apr 2018 12:36:30 +0300 Subject: [PATCH 09/24] + DataRandomizer + TreeObserver --- .../project.pbxproj | 38 +----- .../DataRandomizerTree.swift | 110 ++++++++++++++++++ Example/RxRealmDataSources/TreeItem.swift | 21 ++-- .../OutlineViewController.swift | 25 +--- Pod/Classes/RxOutlineViewRealmDataItem.swift | 1 + .../RxOutlineViewRealmDataTreeObserver.swift | 42 +++++++ 6 files changed, 172 insertions(+), 65 deletions(-) create mode 100644 Example/RxRealmDataSources/DataRandomizerTree.swift create mode 100644 Pod/Classes/RxOutlineViewRealmDataTreeObserver.swift diff --git a/Example/RxRealmDataSources.xcodeproj/project.pbxproj b/Example/RxRealmDataSources.xcodeproj/project.pbxproj index fdc0da1..687664e 100644 --- a/Example/RxRealmDataSources.xcodeproj/project.pbxproj +++ b/Example/RxRealmDataSources.xcodeproj/project.pbxproj @@ -33,6 +33,8 @@ A0F623D0059D4D5BF38B60D9 /* Pods_Demo_RxRealmDataSources_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3CAA1529C0E19B1E708B0776 /* Pods_Demo_RxRealmDataSources_Example.framework */; }; E6063F6F208E2094004423D7 /* OutlineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6063F6E208E2094004423D7 /* OutlineViewController.swift */; }; E6063F72208E256F004423D7 /* TreeItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6063F70208E256F004423D7 /* TreeItem.swift */; }; + E6063F7B208F31BB004423D7 /* DataRandomizerTree.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6063F7A208F31BB004423D7 /* DataRandomizerTree.swift */; }; + E6063F7C208F31BB004423D7 /* DataRandomizerTree.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6063F7A208F31BB004423D7 /* DataRandomizerTree.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -73,6 +75,7 @@ BC02907133053010FAE53FD9 /* Pods-RxRealmDataSources_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RxRealmDataSources_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-RxRealmDataSources_Example/Pods-RxRealmDataSources_Example.release.xcconfig"; sourceTree = ""; }; E6063F6E208E2094004423D7 /* OutlineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OutlineViewController.swift; sourceTree = ""; }; E6063F70208E256F004423D7 /* TreeItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TreeItem.swift; sourceTree = ""; }; + E6063F7A208F31BB004423D7 /* DataRandomizerTree.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = DataRandomizerTree.swift; path = RxRealmDataSources/DataRandomizerTree.swift; sourceTree = ""; }; E709FF280BD1C0E98E09724E /* Pods-Demo-RxRealmDataSources_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Demo-RxRealmDataSources_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-Demo-RxRealmDataSources_Example/Pods-Demo-RxRealmDataSources_Example.release.xcconfig"; sourceTree = ""; }; F047F94251BA9258A7A94AEE /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; /* End PBXFileReference section */ @@ -173,6 +176,7 @@ isa = PBXGroup; children = ( 9C530D071DFDD7340096144C /* DataRandomizer.swift */, + E6063F7A208F31BB004423D7 /* DataRandomizerTree.swift */, 9CA89C601DFDF0E4008ADCD2 /* Data Entities */, ); name = "Cross Platform Classes"; @@ -301,7 +305,6 @@ 607FACCD1AFB9204008FA782 /* Frameworks */, 607FACCE1AFB9204008FA782 /* Resources */, E14D2B725468BD930A30E223 /* [CP] Embed Pods Frameworks */, - 0B94A67A8A2F4532561A0C17 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -321,7 +324,6 @@ 9C5B02CC1E1678C80009FBDE /* Frameworks */, 9C5B02CD1E1678C80009FBDE /* Resources */, 3954C9255BC6A9A3899B15EF /* [CP] Embed Pods Frameworks */, - 580B5F323BBAD77271FF4249 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -397,21 +399,6 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 0B94A67A8A2F4532561A0C17 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Demo-RxRealmDataSources_Example/Pods-Demo-RxRealmDataSources_Example-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; 19F49B5A97B1CF11435191CB /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -476,21 +463,6 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Demo-RxRealmDataSources_MacExample/Pods-Demo-RxRealmDataSources_MacExample-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 580B5F323BBAD77271FF4249 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Demo-RxRealmDataSources_MacExample/Pods-Demo-RxRealmDataSources_MacExample-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; E14D2B725468BD930A30E223 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -531,6 +503,7 @@ 9CA37C471DF853E500C1DF6C /* PersonCell.swift in Sources */, 9CB0B5751DF9E9E800F947D0 /* Lap.swift in Sources */, 9CA89C651DFDF1A4008ADCD2 /* CollectionViewController.swift in Sources */, + E6063F7B208F31BB004423D7 /* DataRandomizerTree.swift in Sources */, 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */, 9CB0B5771DF9EA0F00F947D0 /* Timer.swift in Sources */, 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */, @@ -542,6 +515,7 @@ buildActionMask = 2147483647; files = ( 9C5B02E81E16AB080009FBDE /* DataRandomizer.swift in Sources */, + E6063F7C208F31BB004423D7 /* DataRandomizerTree.swift in Sources */, E6063F6F208E2094004423D7 /* OutlineViewController.swift in Sources */, 9C5B02EA1E16AB0C0009FBDE /* Timer.swift in Sources */, 9C5B02F21E16C8270009FBDE /* CollectionItem.swift in Sources */, diff --git a/Example/RxRealmDataSources/DataRandomizerTree.swift b/Example/RxRealmDataSources/DataRandomizerTree.swift new file mode 100644 index 0000000..a5e88b6 --- /dev/null +++ b/Example/RxRealmDataSources/DataRandomizerTree.swift @@ -0,0 +1,110 @@ +// +// DataRandomizerTree.swift +// RxRealmDataSources +// +// Created by Sergiy Vynnychenko on 4/24/18. +// Copyright © 2018 CocoaPods. All rights reserved. +// + +import Foundation +import RealmSwift +import RxSwift + +class DataRandomizerTree { + + private let bag = DisposeBag() + private let rootItem = TreeItem() + + lazy var config: Realm.Configuration = { + var config = Realm.Configuration.defaultConfiguration + config.inMemoryIdentifier = UUID().uuidString + return config + }() + + private lazy var realm: Realm = { + let realm: Realm + do { + realm = try Realm(configuration: self.config) + return realm + } + catch let e { + print(e) + fatalError() + } + }() + + init() { + try! realm.write { + rootItem.title = "1" + rootItem.time = 40 + realm.add(rootItem) + } + } + + private func insertChild() { + let items = realm.objects(TreeItem.self) + let index = items.count.random() + let parent = items[index] + let newItem = TreeItem() + + + try! realm.write { + newItem.title = "\(parent.title)+1" + newItem.time = parent.time * 3.14 + newItem.parent = parent + + realm.add(newItem) + print("tree item: added child for \(parent.title)]") + } + } + + private func updateItem() { + let items = realm.objects(TreeItem.self) + let index = items.count.random() + let item = items[index] + + try! realm.write { + print("tree item: going to update \(item.title)") + item.title += "+" + } + } + + private func deleteItem() { + let items = realm.objects(TreeItem.self).filter("children.@count = 0") + if items.count > 0 { + let item = items[items.count.random()] + + print("tree item: going to delete \(item.title)") + try! realm.write { + realm.delete(item) + } + //delete?.dispose() + //delete = nil + } + } + + var delete : Disposable? + + func start() { + // insert some laps + Observable.interval(1.0, scheduler: MainScheduler.instance) + .subscribe(onNext: {[weak self] _ in + self?.insertChild() + }) + .disposed(by: bag) + + Observable.interval(1.0, scheduler: MainScheduler.instance) + .subscribe(onNext: {[weak self] _ in + self?.updateItem() + }) + .disposed(by: bag) + + delete = Observable.interval(1.1, scheduler: MainScheduler.instance) + .subscribe(onNext: {[weak self] _ in + self?.deleteItem() + + }) + + } +} + diff --git a/Example/RxRealmDataSources/TreeItem.swift b/Example/RxRealmDataSources/TreeItem.swift index dbd405c..2e62f5e 100644 --- a/Example/RxRealmDataSources/TreeItem.swift +++ b/Example/RxRealmDataSources/TreeItem.swift @@ -11,21 +11,21 @@ import RealmSwift import RxRealmDataSources @objcMembers class TreeItem: Object, RxOutlineViewRealmDataItem { - + override static func primaryKey() -> String? { return "key" } - dynamic var key : String = UUID().uuidString - dynamic var title : String = "" - dynamic var time : Double = 0 - dynamic var children = LinkingObjects(fromType: TreeItem.self, property: "parent") - dynamic var parent : TreeItem? // + dynamic var key : String = UUID().uuidString + dynamic var title : String = "" + dynamic var time : Double = 0 + dynamic var children = LinkingObjects(fromType: TreeItem.self, property: "parent") + dynamic var parent : TreeItem? { didSet { _indexInParent = (parent == nil) ? -1 : parent!.childrenCount } } + dynamic var _indexInParent : Int = -1 // RxOutlineViewRealmDataItem implementation - var isExpandable: Bool { - return childrenCount > 0 - } - var childrenCount : Int { get { return children.count } } + var isExpandable : Bool { return childrenCount > 0 } + var childrenCount : Int { return children.count } + var indexInParent : Int { return _indexInParent} func childAt(idx: Int) -> RxOutlineViewRealmDataItem? { guard idx >= 0 else { return nil } @@ -37,5 +37,6 @@ import RxRealmDataSources func getParent() -> RxOutlineViewRealmDataItem? { return parent } + } diff --git a/Example/RxRealmDataSources_MacExample/OutlineViewController.swift b/Example/RxRealmDataSources_MacExample/OutlineViewController.swift index 9894f89..cd136db 100644 --- a/Example/RxRealmDataSources_MacExample/OutlineViewController.swift +++ b/Example/RxRealmDataSources_MacExample/OutlineViewController.swift @@ -19,7 +19,7 @@ class OutlineViewController: NSViewController { @IBOutlet weak var outlineView: NSOutlineView! private let bag = DisposeBag() - private let data = DataRandomizer() + private let data = DataRandomizerTree() override func viewDidLoad() { super.viewDidLoad() @@ -47,30 +47,9 @@ class OutlineViewController: NSViewController { items .bind(to: outlineView.rx.realmChanges(dataSource)) .disposed(by: bag) - } - - override func viewDidAppear() { - let realm = try! Realm(configuration: data.config) - - let rootItem = TreeItem() - rootItem.title = "Root Item" - rootItem.time = Double(60) - try! realm.write { - realm.add(rootItem) - } - for i in 0...5 { - let newItem = TreeItem() - newItem.title = "Item \(i)" - newItem.time = Double(i * 60) - newItem.parent = rootItem - - try! realm.write { - realm.add(newItem) - } - } + data.start() } - } extension OutlineViewController: NSOutlineViewDelegate { diff --git a/Pod/Classes/RxOutlineViewRealmDataItem.swift b/Pod/Classes/RxOutlineViewRealmDataItem.swift index f639209..3b96c39 100644 --- a/Pod/Classes/RxOutlineViewRealmDataItem.swift +++ b/Pod/Classes/RxOutlineViewRealmDataItem.swift @@ -8,6 +8,7 @@ public protocol RxOutlineViewRealmDataItem { var childrenCount : Int { get } var isExpandable : Bool { get } + var indexInParent : Int { get } func childAt(idx: Int) -> RxOutlineViewRealmDataItem? func getParent() -> RxOutlineViewRealmDataItem? diff --git a/Pod/Classes/RxOutlineViewRealmDataTreeObserver.swift b/Pod/Classes/RxOutlineViewRealmDataTreeObserver.swift new file mode 100644 index 0000000..9574b96 --- /dev/null +++ b/Pod/Classes/RxOutlineViewRealmDataTreeObserver.swift @@ -0,0 +1,42 @@ +// +// RxOutlineViewRealmDataTreeObserver.swift +// RxRealmDataSources-macOS +// +// Created by Loki on 4/24/18. +// + +import Foundation + +class ObserverTreeNode { + private(set) var children = [ObserverTreeNode]() + private(set) var childrenCount: Int = 0 + + init(item: RxOutlineViewRealmDataItem) { + + childrenCount = item.childrenCount + + for i in 0 ..< item.childrenCount { + let child = item.childAt(idx: i) + assert(child != nil) + if let child = child { + children.append(ObserverTreeNode(item: child)) + } + } + } + + func update(item: RxOutlineViewRealmDataItem) { + + } +} + +class RxOutlineViewRealmDataTreeObserver { + + private(set) var items = [ObserverTreeNode]() + + init(rootItems: [RxOutlineViewRealmDataItem]) { + for item in rootItems { + items.append(ObserverTreeNode(item: item)) + } + } + +} From f6d846796b8c7062feab4b9a98f1bf033ab8c8db Mon Sep 17 00:00:00 2001 From: Loki Date: Mon, 14 May 2018 20:11:16 +0300 Subject: [PATCH 10/24] RxOutlineViewRealmDataTreeObserver update method --- Example/RxRealmDataSources/TreeItem.swift | 3 +++ Pod/Classes/RxOutlineViewRealmDataItem.swift | 1 + .../RxOutlineViewRealmDataSource.swift | 14 +++++----- .../RxOutlineViewRealmDataTreeObserver.swift | 27 ++++++++++++------- 4 files changed, 28 insertions(+), 17 deletions(-) diff --git a/Example/RxRealmDataSources/TreeItem.swift b/Example/RxRealmDataSources/TreeItem.swift index 2e62f5e..0720a59 100644 --- a/Example/RxRealmDataSources/TreeItem.swift +++ b/Example/RxRealmDataSources/TreeItem.swift @@ -38,5 +38,8 @@ import RxRealmDataSources return parent } + func getChildren() -> [RxOutlineViewRealmDataItem] { + return children.toArray() + } } diff --git a/Pod/Classes/RxOutlineViewRealmDataItem.swift b/Pod/Classes/RxOutlineViewRealmDataItem.swift index 3b96c39..8a2830c 100644 --- a/Pod/Classes/RxOutlineViewRealmDataItem.swift +++ b/Pod/Classes/RxOutlineViewRealmDataItem.swift @@ -12,4 +12,5 @@ public protocol RxOutlineViewRealmDataItem { func childAt(idx: Int) -> RxOutlineViewRealmDataItem? func getParent() -> RxOutlineViewRealmDataItem? + func getChildren() -> [RxOutlineViewRealmDataItem] } diff --git a/Pod/Classes/RxOutlineViewRealmDataSource.swift b/Pod/Classes/RxOutlineViewRealmDataSource.swift index 9ddf693..ecbfc0e 100644 --- a/Pod/Classes/RxOutlineViewRealmDataSource.swift +++ b/Pod/Classes/RxOutlineViewRealmDataSource.swift @@ -121,20 +121,20 @@ open class RxOutlineViewRealmDataSource: NSObject, NSOutlineViewDataS fatalError("You have to bind a table view to the data source.") } - guard animated else { - outlineView.reloadData() - return - } + //guard animated else { + // outlineView.reloadData() + // return + //} // guard let changes = changes else { // outlineView.reloadData() // return // } - outlineView.reloadData() + //outlineView.reloadData() - //outlineView.beginUpdates() - //outlineView.removeItems(at: IndexSet(changes.deleted), inParent: <#T##Any?#>, withAnimation: <#T##NSTableView.AnimationOptions#>) + outlineView.beginUpdates() + outlineView.removeItems(at: IndexSet(changes.deleted), inParent: <#T##Any?#>, withAnimation: <#T##NSTableView.AnimationOptions#>) //tableView.removeRows(at: IndexSet(changes.deleted), withAnimation: rowAnimations.delete) //tableView.insertRows(at: IndexSet(changes.inserted), withAnimation: rowAnimations.insert) //outlineView.reloadData(forRowIndexes: IndexSet(changes.updated), columnIndexes: IndexSet([0])) diff --git a/Pod/Classes/RxOutlineViewRealmDataTreeObserver.swift b/Pod/Classes/RxOutlineViewRealmDataTreeObserver.swift index 9574b96..9ed05b7 100644 --- a/Pod/Classes/RxOutlineViewRealmDataTreeObserver.swift +++ b/Pod/Classes/RxOutlineViewRealmDataTreeObserver.swift @@ -9,24 +9,31 @@ import Foundation class ObserverTreeNode { private(set) var children = [ObserverTreeNode]() - private(set) var childrenCount: Int = 0 + private(set) var childrenCountBefore : Int = 0 init(item: RxOutlineViewRealmDataItem) { + item.getChildren().forEach { + children.append(ObserverTreeNode(item: $0)) + } + } + + func update(item: RxOutlineViewRealmDataItem) { + childrenCountBefore = children.count + + let diff = children.count - item.childrenCount - childrenCount = item.childrenCount + if diff > 0 { + children.removeLast(diff) + } - for i in 0 ..< item.childrenCount { - let child = item.childAt(idx: i) - assert(child != nil) - if let child = child { + for (idx,child) in item.getChildren().enumerated() { + if idx < children.count { + children[idx].update(item: child) + } else { children.append(ObserverTreeNode(item: child)) } } } - - func update(item: RxOutlineViewRealmDataItem) { - - } } class RxOutlineViewRealmDataTreeObserver { From 6f67c19cf6a7fda638b2f4ae94df75225e1a046b Mon Sep 17 00:00:00 2001 From: Loki Date: Tue, 15 May 2018 18:57:26 +0300 Subject: [PATCH 11/24] RxOutlineView working prototype --- .../DataRandomizerTree.swift | 13 ++-- Example/RxRealmDataSources/TreeItem.swift | 2 + Pod/Classes/RxOutlineViewRealmDataItem.swift | 3 + .../RxOutlineViewRealmDataSource.swift | 64 ++++++++----------- .../RxOutlineViewRealmDataTreeObserver.swift | 49 -------------- 5 files changed, 37 insertions(+), 94 deletions(-) delete mode 100644 Pod/Classes/RxOutlineViewRealmDataTreeObserver.swift diff --git a/Example/RxRealmDataSources/DataRandomizerTree.swift b/Example/RxRealmDataSources/DataRandomizerTree.swift index a5e88b6..1f468ab 100644 --- a/Example/RxRealmDataSources/DataRandomizerTree.swift +++ b/Example/RxRealmDataSources/DataRandomizerTree.swift @@ -74,17 +74,15 @@ class DataRandomizerTree { if items.count > 0 { let item = items[items.count.random()] - print("tree item: going to delete \(item.title)") + let parentTitle = item.parent?.title ?? "root item" + print("tree item: going to delete \(item.title) of parent \(parentTitle)") + try! realm.write { realm.delete(item) } - //delete?.dispose() - //delete = nil } } - var delete : Disposable? - func start() { // insert some laps Observable.interval(1.0, scheduler: MainScheduler.instance) @@ -99,12 +97,11 @@ class DataRandomizerTree { }) .disposed(by: bag) - delete = Observable.interval(1.1, scheduler: MainScheduler.instance) + Observable.interval(2.0, scheduler: MainScheduler.instance) .subscribe(onNext: {[weak self] _ in self?.deleteItem() - }) - + .disposed(by: bag) } } diff --git a/Example/RxRealmDataSources/TreeItem.swift b/Example/RxRealmDataSources/TreeItem.swift index 0720a59..e3afa0b 100644 --- a/Example/RxRealmDataSources/TreeItem.swift +++ b/Example/RxRealmDataSources/TreeItem.swift @@ -11,6 +11,8 @@ import RealmSwift import RxRealmDataSources @objcMembers class TreeItem: Object, RxOutlineViewRealmDataItem { + var dbgTitle: String { return title } + override static func primaryKey() -> String? { return "key" } diff --git a/Pod/Classes/RxOutlineViewRealmDataItem.swift b/Pod/Classes/RxOutlineViewRealmDataItem.swift index 8a2830c..699dce4 100644 --- a/Pod/Classes/RxOutlineViewRealmDataItem.swift +++ b/Pod/Classes/RxOutlineViewRealmDataItem.swift @@ -6,6 +6,7 @@ // public protocol RxOutlineViewRealmDataItem { + var key : String { get } var childrenCount : Int { get } var isExpandable : Bool { get } var indexInParent : Int { get } @@ -13,4 +14,6 @@ public protocol RxOutlineViewRealmDataItem { func childAt(idx: Int) -> RxOutlineViewRealmDataItem? func getParent() -> RxOutlineViewRealmDataItem? func getChildren() -> [RxOutlineViewRealmDataItem] + + var dbgTitle : String { get } } diff --git a/Pod/Classes/RxOutlineViewRealmDataSource.swift b/Pod/Classes/RxOutlineViewRealmDataSource.swift index ecbfc0e..b31c75b 100644 --- a/Pod/Classes/RxOutlineViewRealmDataSource.swift +++ b/Pod/Classes/RxOutlineViewRealmDataSource.swift @@ -51,45 +51,52 @@ open class RxOutlineViewRealmDataSource: NSObject, NSOutlineViewDataS } } + private func objectBy(key: Any) -> RxOutlineViewRealmDataItem? { + guard let items = items else { return nil } + guard let key = key as? String else { return nil } + guard let index = items.index(matching: "key = %s", key) else { return nil } + + return items[index] as? RxOutlineViewRealmDataItem + } + + // MARK: - NSOutlineViewDataSource protocol public func outlineView(_ outlineView: NSOutlineView, viewFor tableColumn: NSTableColumn?, item: Any) -> NSView? { - guard let item = item as? E else { return nil } + guard let object = objectBy(key: item) as? E else { return nil } let columnId = tableColumn?.identifier.rawValue - return cellFactory(outlineView, columnId, item) + return cellFactory(outlineView, columnId, object) } public func outlineView(_ outlineView: NSOutlineView, numberOfChildrenOfItem item: Any?) -> Int { - if item == nil { + guard let item = item else { if let rootItems = items?.filter("parent = null", 0) { return rootItems.count } return 0 } - if let item = item as? RxOutlineViewRealmDataItem { - return item.childrenCount - } - return 0 + guard let object = objectBy(key: item) else { return 0 } + return object.childrenCount } public func outlineView(_ outlineView: NSOutlineView, child index: Int, ofItem item: Any?) -> Any { - if item == nil { - if let rootItems = items?.filter("parent = null", 0) { - return rootItems[index] + guard let item = item else { + guard let items = items else { return false } + if let rootItems = Array(items.filter("parent = null", 0)) as? [RxOutlineViewRealmDataItem] { + return rootItems[index].key } - return 0 + return false } - guard let item = item as? RxOutlineViewRealmDataItem else { return false } - guard let child = item.childAt(idx: index) else { return false } - return child - + guard let object = objectBy(key: item) else { return false } + guard let child = object.childAt(idx: index) else { return false} + + return child.key } public func outlineView(_ outlineView: NSOutlineView, isItemExpandable item: Any) -> Bool { - guard let item = item as? RxOutlineViewRealmDataItem else { return false } - - return item.isExpandable + guard let object = objectBy(key: item) else { return false } + return object.isExpandable } // MARK: - Proxy unimplemented data source and delegate methods @@ -118,27 +125,10 @@ open class RxOutlineViewRealmDataSource: NSObject, NSOutlineViewDataS } guard let outlineView = outlineView else { - fatalError("You have to bind a table view to the data source.") + fatalError("You have to bind a outline view to the data source.") } - //guard animated else { - // outlineView.reloadData() - // return - //} - -// guard let changes = changes else { -// outlineView.reloadData() -// return -// } - - //outlineView.reloadData() - - outlineView.beginUpdates() - outlineView.removeItems(at: IndexSet(changes.deleted), inParent: <#T##Any?#>, withAnimation: <#T##NSTableView.AnimationOptions#>) - //tableView.removeRows(at: IndexSet(changes.deleted), withAnimation: rowAnimations.delete) - //tableView.insertRows(at: IndexSet(changes.inserted), withAnimation: rowAnimations.insert) - //outlineView.reloadData(forRowIndexes: IndexSet(changes.updated), columnIndexes: IndexSet([0])) - //outlineView.endUpdates() + outlineView.reloadData() } } diff --git a/Pod/Classes/RxOutlineViewRealmDataTreeObserver.swift b/Pod/Classes/RxOutlineViewRealmDataTreeObserver.swift deleted file mode 100644 index 9ed05b7..0000000 --- a/Pod/Classes/RxOutlineViewRealmDataTreeObserver.swift +++ /dev/null @@ -1,49 +0,0 @@ -// -// RxOutlineViewRealmDataTreeObserver.swift -// RxRealmDataSources-macOS -// -// Created by Loki on 4/24/18. -// - -import Foundation - -class ObserverTreeNode { - private(set) var children = [ObserverTreeNode]() - private(set) var childrenCountBefore : Int = 0 - - init(item: RxOutlineViewRealmDataItem) { - item.getChildren().forEach { - children.append(ObserverTreeNode(item: $0)) - } - } - - func update(item: RxOutlineViewRealmDataItem) { - childrenCountBefore = children.count - - let diff = children.count - item.childrenCount - - if diff > 0 { - children.removeLast(diff) - } - - for (idx,child) in item.getChildren().enumerated() { - if idx < children.count { - children[idx].update(item: child) - } else { - children.append(ObserverTreeNode(item: child)) - } - } - } -} - -class RxOutlineViewRealmDataTreeObserver { - - private(set) var items = [ObserverTreeNode]() - - init(rootItems: [RxOutlineViewRealmDataItem]) { - for item in rootItems { - items.append(ObserverTreeNode(item: item)) - } - } - -} From 28e0804616588f7bd4567269cbde9a3a812991e5 Mon Sep 17 00:00:00 2001 From: Loki Date: Tue, 15 May 2018 19:05:18 +0300 Subject: [PATCH 12/24] debug code clean-up --- Example/RxRealmDataSources/TreeItem.swift | 5 +---- Pod/Classes/RxOutlineViewRealmDataItem.swift | 2 -- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/Example/RxRealmDataSources/TreeItem.swift b/Example/RxRealmDataSources/TreeItem.swift index e3afa0b..b0081c4 100644 --- a/Example/RxRealmDataSources/TreeItem.swift +++ b/Example/RxRealmDataSources/TreeItem.swift @@ -11,9 +11,7 @@ import RealmSwift import RxRealmDataSources @objcMembers class TreeItem: Object, RxOutlineViewRealmDataItem { - var dbgTitle: String { return title } - - + override static func primaryKey() -> String? { return "key" } dynamic var key : String = UUID().uuidString @@ -22,7 +20,6 @@ import RxRealmDataSources dynamic var children = LinkingObjects(fromType: TreeItem.self, property: "parent") dynamic var parent : TreeItem? { didSet { _indexInParent = (parent == nil) ? -1 : parent!.childrenCount } } dynamic var _indexInParent : Int = -1 - // RxOutlineViewRealmDataItem implementation var isExpandable : Bool { return childrenCount > 0 } diff --git a/Pod/Classes/RxOutlineViewRealmDataItem.swift b/Pod/Classes/RxOutlineViewRealmDataItem.swift index 699dce4..0c3b2a7 100644 --- a/Pod/Classes/RxOutlineViewRealmDataItem.swift +++ b/Pod/Classes/RxOutlineViewRealmDataItem.swift @@ -14,6 +14,4 @@ public protocol RxOutlineViewRealmDataItem { func childAt(idx: Int) -> RxOutlineViewRealmDataItem? func getParent() -> RxOutlineViewRealmDataItem? func getChildren() -> [RxOutlineViewRealmDataItem] - - var dbgTitle : String { get } } From f75215ad84aa650af7ec6d4cb0816b77bb49a40d Mon Sep 17 00:00:00 2001 From: Loki Date: Tue, 15 May 2018 19:15:05 +0300 Subject: [PATCH 13/24] NSOutlineView doc --- README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/README.md b/README.md index 69fb1ea..f9613f3 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,38 @@ laps .bindTo(collectionView.rx.realmChanges(dataSource)) .disposed(by: bag) ``` +### Binding to NSOutlineView + +Check out the included demo app to see this in action. + +```swift +// create data source +let dataSource = RxOutlineViewRealmDataSource(cellIdentifier: "Title", cellType: NSTableCellView.self) { +cell, columnId, treeItem in + +guard let columnId = columnId else { return } + +switch columnId { +case "Title": +cell.textField!.stringValue = treeItem.title +case "Time": +cell.textField!.stringValue = "\(treeItem.time)" +default: +break +} +} +dataSource.delegate = self + +// RxRealm to get Observable +let realm = try! Realm(configuration: data.config) +let items = Observable.changeset(from: realm.objects(TreeItem.self)) +.share() + +// bind to table view +items +.bind(to: outlineView.rx.realmChanges(dataSource)) +.disposed(by: bag) +``` ### Reacting to cell taps From 85d7d8e8afcb88f2443364569477b185ce7304f1 Mon Sep 17 00:00:00 2001 From: Loki Date: Tue, 15 May 2018 19:17:02 +0300 Subject: [PATCH 14/24] fix in documentation formatting --- README.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index f9613f3..7b00de3 100644 --- a/README.md +++ b/README.md @@ -62,30 +62,30 @@ Check out the included demo app to see this in action. ```swift // create data source let dataSource = RxOutlineViewRealmDataSource(cellIdentifier: "Title", cellType: NSTableCellView.self) { -cell, columnId, treeItem in - -guard let columnId = columnId else { return } - -switch columnId { -case "Title": -cell.textField!.stringValue = treeItem.title -case "Time": -cell.textField!.stringValue = "\(treeItem.time)" -default: -break -} + cell, columnId, treeItem in + + guard let columnId = columnId else { return } + + switch columnId { + case "Title": + cell.textField!.stringValue = treeItem.title + case "Time": + cell.textField!.stringValue = "\(treeItem.time)" + default: + break + } } dataSource.delegate = self // RxRealm to get Observable let realm = try! Realm(configuration: data.config) let items = Observable.changeset(from: realm.objects(TreeItem.self)) -.share() + .share() // bind to table view items -.bind(to: outlineView.rx.realmChanges(dataSource)) -.disposed(by: bag) + .bind(to: outlineView.rx.realmChanges(dataSource)) + .disposed(by: bag) ``` ### Reacting to cell taps From 9ab334ea9884b6e36ce10abe39bb9cc87c023e69 Mon Sep 17 00:00:00 2001 From: Loki Date: Tue, 15 May 2018 19:53:50 +0300 Subject: [PATCH 15/24] doc fix installation --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7b00de3..3c5d1f6 100644 --- a/README.md +++ b/README.md @@ -107,7 +107,7 @@ This library depends on __RxSwift__, __RealmSwift__, and __RxRealm__. RxRealm is available through [CocoaPods](http://cocoapods.org). To install it, simply add the following line to your Podfile: ```ruby -pod "RxRealmDataSources" +pod "RxRealmDataSources", :git => 'https://github.com/serg-vinnie/RxRealmDataSources.git' ``` ## TODO From 239d838f75840f9372f10b69b916076eafc69b1a Mon Sep 17 00:00:00 2001 From: Loki Date: Tue, 15 May 2018 19:57:27 +0300 Subject: [PATCH 16/24] doc fix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3c5d1f6..cbaf679 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# RxRealmDataSources +# RxRealmDataSources (fork) [![Version](https://img.shields.io/cocoapods/v/RxRealmDataSources.svg?style=flat)](http://cocoapods.org/pods/RxRealmDataSources) [![License](https://img.shields.io/cocoapods/l/RxRealmDataSources.svg?style=flat)](http://cocoapods.org/pods/RxRealmDataSources) From aa0326120ccfc3a4215c968cf4fd2e74ff520564 Mon Sep 17 00:00:00 2001 From: Loki Date: Tue, 15 May 2018 19:58:27 +0300 Subject: [PATCH 17/24] doc fix --- README.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/README.md b/README.md index cbaf679..fa0061e 100644 --- a/README.md +++ b/README.md @@ -110,10 +110,6 @@ RxRealm is available through [CocoaPods](http://cocoapods.org). To install it, s pod "RxRealmDataSources", :git => 'https://github.com/serg-vinnie/RxRealmDataSources.git' ``` -## TODO - -* Test add platforms and add compatibility for the pod - ## License This library belongs to _RxSwiftCommunity_. It has been created by Marin Todorov. From c44ac95c565ff49e17e0af6fca18b108d02cb8f7 Mon Sep 17 00:00:00 2001 From: Loki Date: Fri, 18 May 2018 10:20:24 +0300 Subject: [PATCH 18/24] RxTableViewRealmDataSource fix support of updates for any number of columns --- Pod/Classes/RxTableViewRealmDataSource.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pod/Classes/RxTableViewRealmDataSource.swift b/Pod/Classes/RxTableViewRealmDataSource.swift index 313a2f4..064f757 100644 --- a/Pod/Classes/RxTableViewRealmDataSource.swift +++ b/Pod/Classes/RxTableViewRealmDataSource.swift @@ -216,7 +216,7 @@ import RxRealm tableView.beginUpdates() tableView.removeRows(at: IndexSet(changes.deleted), withAnimation: rowAnimations.delete) tableView.insertRows(at: IndexSet(changes.inserted), withAnimation: rowAnimations.insert) - tableView.reloadData(forRowIndexes: IndexSet(changes.updated), columnIndexes: IndexSet([0])) + tableView.reloadData(forRowIndexes: IndexSet(changes.updated), columnIndexes: IndexSet(Array(0 ..< tableView.numberOfColumns))) tableView.endUpdates() } } From 13468ebe6bd3354fd0201ead616d06128d226834 Mon Sep 17 00:00:00 2001 From: Loki Date: Tue, 19 Jun 2018 12:58:26 +0300 Subject: [PATCH 19/24] podspec update --- RxRealmDataSources.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RxRealmDataSources.podspec b/RxRealmDataSources.podspec index 02826af..2bf55d2 100644 --- a/RxRealmDataSources.podspec +++ b/RxRealmDataSources.podspec @@ -23,7 +23,7 @@ Pod::Spec.new do |s| s.frameworks = 'Foundation' - s.dependency 'RealmSwift', '~> 3.0' + s.dependency 'RealmSwift', '~> 3.7.3' s.dependency 'RxSwift', '~> 4.0' s.dependency 'RxCocoa', '~> 4.0' s.dependency 'RxRealm', '~> 0.7.3' From b1bba308da4da32a44c8841700f1b931287d59c9 Mon Sep 17 00:00:00 2001 From: Loki Date: Tue, 19 Jun 2018 13:00:07 +0300 Subject: [PATCH 20/24] update --- RxRealmDataSources.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RxRealmDataSources.podspec b/RxRealmDataSources.podspec index 2bf55d2..fefcb1b 100644 --- a/RxRealmDataSources.podspec +++ b/RxRealmDataSources.podspec @@ -26,5 +26,5 @@ Pod::Spec.new do |s| s.dependency 'RealmSwift', '~> 3.7.3' s.dependency 'RxSwift', '~> 4.0' s.dependency 'RxCocoa', '~> 4.0' - s.dependency 'RxRealm', '~> 0.7.3' + s.dependency 'RxRealm', '~> 0.7.5' end From 2e29e967da2b365fa1b2d13528eb5fde82abdb97 Mon Sep 17 00:00:00 2001 From: Loki Date: Fri, 28 Dec 2018 22:07:15 +0200 Subject: [PATCH 21/24] ... --- .../project.pbxproj | 146 ++++++++---------- .../RxRealmDataSources_MacExample.xcscheme | 91 +++++++++++ 2 files changed, 159 insertions(+), 78 deletions(-) create mode 100644 Example/RxRealmDataSources.xcodeproj/xcshareddata/xcschemes/RxRealmDataSources_MacExample.xcscheme diff --git a/Example/RxRealmDataSources.xcodeproj/project.pbxproj b/Example/RxRealmDataSources.xcodeproj/project.pbxproj index 687664e..d3778ab 100644 --- a/Example/RxRealmDataSources.xcodeproj/project.pbxproj +++ b/Example/RxRealmDataSources.xcodeproj/project.pbxproj @@ -7,7 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 145AC3CBCB09D8F547291B1D /* Pods_Demo_RxRealmDataSources_MacExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F784B7D7B4997170AC744C0 /* Pods_Demo_RxRealmDataSources_MacExample.framework */; }; 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; }; 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD71AFB9204008FA782 /* ViewController.swift */; }; 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; }; @@ -30,7 +29,8 @@ 9CA89C651DFDF1A4008ADCD2 /* CollectionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CA89C641DFDF1A4008ADCD2 /* CollectionViewController.swift */; }; 9CB0B5751DF9E9E800F947D0 /* Lap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CB0B5741DF9E9E800F947D0 /* Lap.swift */; }; 9CB0B5771DF9EA0F00F947D0 /* Timer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9CB0B5761DF9EA0F00F947D0 /* Timer.swift */; }; - A0F623D0059D4D5BF38B60D9 /* Pods_Demo_RxRealmDataSources_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3CAA1529C0E19B1E708B0776 /* Pods_Demo_RxRealmDataSources_Example.framework */; }; + C2AA37282514491D85F03F8C /* Pods_Demo_RxRealmDataSources_MacExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4E989E69EE47D8259CD1C1FC /* Pods_Demo_RxRealmDataSources_MacExample.framework */; }; + C35122078F202541CCA2A4CF /* Pods_Demo_RxRealmDataSources_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C0165E100730CC230A7ED68 /* Pods_Demo_RxRealmDataSources_Example.framework */; }; E6063F6F208E2094004423D7 /* OutlineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6063F6E208E2094004423D7 /* OutlineViewController.swift */; }; E6063F72208E256F004423D7 /* TreeItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6063F70208E256F004423D7 /* TreeItem.swift */; }; E6063F7B208F31BB004423D7 /* DataRandomizerTree.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6063F7A208F31BB004423D7 /* DataRandomizerTree.swift */; }; @@ -38,13 +38,12 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 0369C60B6B5004A423A164C9 /* Pods-Demo-RxRealmDataSources_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Demo-RxRealmDataSources_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Demo-RxRealmDataSources_Example/Pods-Demo-RxRealmDataSources_Example.debug.xcconfig"; sourceTree = ""; }; + 0F18398C20503792E18B6EC5 /* Pods-Demo-RxRealmDataSources_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Demo-RxRealmDataSources_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-Demo-RxRealmDataSources_Example/Pods-Demo-RxRealmDataSources_Example.release.xcconfig"; sourceTree = ""; }; 2234A7252CB12801B9D5CC59 /* RxRealmDataSources.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = RxRealmDataSources.podspec; path = ../RxRealmDataSources.podspec; sourceTree = ""; }; - 2BFC2E5B87B46AEC0715AB69 /* Pods-RxRealmDataSources_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RxRealmDataSources_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RxRealmDataSources_Tests/Pods-RxRealmDataSources_Tests.debug.xcconfig"; sourceTree = ""; }; 389E1B2B7B345E4DD32A154F /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; - 3CAA1529C0E19B1E708B0776 /* Pods_Demo_RxRealmDataSources_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Demo_RxRealmDataSources_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 3FC4E7E2D70508F61AC94626 /* Pods-RxRealmDataSources_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RxRealmDataSources_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-RxRealmDataSources_Tests/Pods-RxRealmDataSources_Tests.release.xcconfig"; sourceTree = ""; }; - 433CFEEAC500E1915E943474 /* Pods-Demo-RxRealmDataSources_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Demo-RxRealmDataSources_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Demo-RxRealmDataSources_Example/Pods-Demo-RxRealmDataSources_Example.debug.xcconfig"; sourceTree = ""; }; - 4F784B7D7B4997170AC744C0 /* Pods_Demo_RxRealmDataSources_MacExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Demo_RxRealmDataSources_MacExample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 40C04A3DB3B2604895AEB697 /* Pods-Demo-RxRealmDataSources_MacExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Demo-RxRealmDataSources_MacExample.release.xcconfig"; path = "Pods/Target Support Files/Pods-Demo-RxRealmDataSources_MacExample/Pods-Demo-RxRealmDataSources_MacExample.release.xcconfig"; sourceTree = ""; }; + 4E989E69EE47D8259CD1C1FC /* Pods_Demo_RxRealmDataSources_MacExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Demo_RxRealmDataSources_MacExample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 607FACD01AFB9204008FA782 /* RxRealmDataSources_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RxRealmDataSources_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; @@ -52,10 +51,7 @@ 607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; - 608B2F81EBE23EAF84A87062 /* Pods-Demo-RxRealmDataSources_MacExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Demo-RxRealmDataSources_MacExample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Demo-RxRealmDataSources_MacExample/Pods-Demo-RxRealmDataSources_MacExample.debug.xcconfig"; sourceTree = ""; }; - 678ED4D6B7FB3D0B89984A16 /* Pods_Demo_RxRealmDataSources_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Demo_RxRealmDataSources_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 6EBE80B271B15C2CEC56038E /* Pods-Demo-RxRealmDataSources_MacExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Demo-RxRealmDataSources_MacExample.release.xcconfig"; path = "Pods/Target Support Files/Pods-Demo-RxRealmDataSources_MacExample/Pods-Demo-RxRealmDataSources_MacExample.release.xcconfig"; sourceTree = ""; }; - 6F8E8F0B4B2A0D71CF549B85 /* Pods-RxRealmDataSources_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RxRealmDataSources_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RxRealmDataSources_Example/Pods-RxRealmDataSources_Example.debug.xcconfig"; sourceTree = ""; }; + 8C0165E100730CC230A7ED68 /* Pods_Demo_RxRealmDataSources_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Demo_RxRealmDataSources_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 9C530D071DFDD7340096144C /* DataRandomizer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DataRandomizer.swift; path = RxRealmDataSources/DataRandomizer.swift; sourceTree = ""; }; 9C5B02CF1E1678C80009FBDE /* RxRealmDataSources_MacExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RxRealmDataSources_MacExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 9C5B02D11E1678C80009FBDE /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; @@ -72,11 +68,10 @@ 9CA89C641DFDF1A4008ADCD2 /* CollectionViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CollectionViewController.swift; sourceTree = ""; }; 9CB0B5741DF9E9E800F947D0 /* Lap.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Lap.swift; sourceTree = ""; }; 9CB0B5761DF9EA0F00F947D0 /* Timer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Timer.swift; sourceTree = ""; }; - BC02907133053010FAE53FD9 /* Pods-RxRealmDataSources_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RxRealmDataSources_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-RxRealmDataSources_Example/Pods-RxRealmDataSources_Example.release.xcconfig"; sourceTree = ""; }; + A049FE6F97A21C6D931D3A1C /* Pods-Demo-RxRealmDataSources_MacExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Demo-RxRealmDataSources_MacExample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Demo-RxRealmDataSources_MacExample/Pods-Demo-RxRealmDataSources_MacExample.debug.xcconfig"; sourceTree = ""; }; E6063F6E208E2094004423D7 /* OutlineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OutlineViewController.swift; sourceTree = ""; }; E6063F70208E256F004423D7 /* TreeItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TreeItem.swift; sourceTree = ""; }; E6063F7A208F31BB004423D7 /* DataRandomizerTree.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = DataRandomizerTree.swift; path = RxRealmDataSources/DataRandomizerTree.swift; sourceTree = ""; }; - E709FF280BD1C0E98E09724E /* Pods-Demo-RxRealmDataSources_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Demo-RxRealmDataSources_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-Demo-RxRealmDataSources_Example/Pods-Demo-RxRealmDataSources_Example.release.xcconfig"; sourceTree = ""; }; F047F94251BA9258A7A94AEE /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; /* End PBXFileReference section */ @@ -85,7 +80,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A0F623D0059D4D5BF38B60D9 /* Pods_Demo_RxRealmDataSources_Example.framework in Frameworks */, + C35122078F202541CCA2A4CF /* Pods_Demo_RxRealmDataSources_Example.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -93,23 +88,13 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 145AC3CBCB09D8F547291B1D /* Pods_Demo_RxRealmDataSources_MacExample.framework in Frameworks */, + C2AA37282514491D85F03F8C /* Pods_Demo_RxRealmDataSources_MacExample.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 58AC3B8249FCD1A734C4B7BC /* Frameworks */ = { - isa = PBXGroup; - children = ( - 3CAA1529C0E19B1E708B0776 /* Pods_Demo_RxRealmDataSources_Example.framework */, - 4F784B7D7B4997170AC744C0 /* Pods_Demo_RxRealmDataSources_MacExample.framework */, - 678ED4D6B7FB3D0B89984A16 /* Pods_Demo_RxRealmDataSources_Tests.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; 607FACC71AFB9204008FA782 = { isa = PBXGroup; children = ( @@ -118,8 +103,8 @@ 607FACD21AFB9204008FA782 /* iOS Example */, 9C5B02D01E1678C80009FBDE /* macOS Example */, 607FACD11AFB9204008FA782 /* Products */, - F29E453A66420BEFA081E479 /* Pods */, - 58AC3B8249FCD1A734C4B7BC /* Frameworks */, + 82E5B77B6199518C6E426A62 /* Pods */, + EF4570CBA3EF15A5AAB7F948 /* Frameworks */, ); sourceTree = ""; }; @@ -161,6 +146,17 @@ name = "Podspec Metadata"; sourceTree = ""; }; + 82E5B77B6199518C6E426A62 /* Pods */ = { + isa = PBXGroup; + children = ( + 0369C60B6B5004A423A164C9 /* Pods-Demo-RxRealmDataSources_Example.debug.xcconfig */, + 0F18398C20503792E18B6EC5 /* Pods-Demo-RxRealmDataSources_Example.release.xcconfig */, + A049FE6F97A21C6D931D3A1C /* Pods-Demo-RxRealmDataSources_MacExample.debug.xcconfig */, + 40C04A3DB3B2604895AEB697 /* Pods-Demo-RxRealmDataSources_MacExample.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; 9C530D091DFDDDEC0096144C /* Assets */ = { isa = PBXGroup; children = ( @@ -278,19 +274,13 @@ name = "3. Outline view Data Source"; sourceTree = ""; }; - F29E453A66420BEFA081E479 /* Pods */ = { + EF4570CBA3EF15A5AAB7F948 /* Frameworks */ = { isa = PBXGroup; children = ( - 6F8E8F0B4B2A0D71CF549B85 /* Pods-RxRealmDataSources_Example.debug.xcconfig */, - BC02907133053010FAE53FD9 /* Pods-RxRealmDataSources_Example.release.xcconfig */, - 2BFC2E5B87B46AEC0715AB69 /* Pods-RxRealmDataSources_Tests.debug.xcconfig */, - 3FC4E7E2D70508F61AC94626 /* Pods-RxRealmDataSources_Tests.release.xcconfig */, - 433CFEEAC500E1915E943474 /* Pods-Demo-RxRealmDataSources_Example.debug.xcconfig */, - E709FF280BD1C0E98E09724E /* Pods-Demo-RxRealmDataSources_Example.release.xcconfig */, - 608B2F81EBE23EAF84A87062 /* Pods-Demo-RxRealmDataSources_MacExample.debug.xcconfig */, - 6EBE80B271B15C2CEC56038E /* Pods-Demo-RxRealmDataSources_MacExample.release.xcconfig */, + 8C0165E100730CC230A7ED68 /* Pods_Demo_RxRealmDataSources_Example.framework */, + 4E989E69EE47D8259CD1C1FC /* Pods_Demo_RxRealmDataSources_MacExample.framework */, ); - name = Pods; + name = Frameworks; sourceTree = ""; }; /* End PBXGroup section */ @@ -300,11 +290,11 @@ isa = PBXNativeTarget; buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "RxRealmDataSources_Example" */; buildPhases = ( - 19F49B5A97B1CF11435191CB /* [CP] Check Pods Manifest.lock */, + 52A16AEA2F8FE7F6F8AB4685 /* [CP] Check Pods Manifest.lock */, 607FACCC1AFB9204008FA782 /* Sources */, 607FACCD1AFB9204008FA782 /* Frameworks */, 607FACCE1AFB9204008FA782 /* Resources */, - E14D2B725468BD930A30E223 /* [CP] Embed Pods Frameworks */, + 45AD4BAB0011E997C5F3A03C /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -319,11 +309,11 @@ isa = PBXNativeTarget; buildConfigurationList = 9C5B02DB1E1678C80009FBDE /* Build configuration list for PBXNativeTarget "RxRealmDataSources_MacExample" */; buildPhases = ( - 1E9ABA061FA7F580EBAF12EA /* [CP] Check Pods Manifest.lock */, + 3B26E4403B1F7167F977F871 /* [CP] Check Pods Manifest.lock */, 9C5B02CB1E1678C80009FBDE /* Sources */, 9C5B02CC1E1678C80009FBDE /* Frameworks */, 9C5B02CD1E1678C80009FBDE /* Resources */, - 3954C9255BC6A9A3899B15EF /* [CP] Embed Pods Frameworks */, + 9D0F92AD170E274992609D31 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -399,7 +389,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 19F49B5A97B1CF11435191CB /* [CP] Check Pods Manifest.lock */ = { + 3B26E4403B1F7167F977F871 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -410,72 +400,72 @@ ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Demo-RxRealmDataSources_Example-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-Demo-RxRealmDataSources_MacExample-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 1E9ABA061FA7F580EBAF12EA /* [CP] Check Pods Manifest.lock */ = { + 45AD4BAB0011E997C5F3A03C /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", + "${SRCROOT}/Pods/Target Support Files/Pods-Demo-RxRealmDataSources_Example/Pods-Demo-RxRealmDataSources_Example-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Realm-iOS/Realm.framework", + "${BUILT_PRODUCTS_DIR}/RealmSwift-iOS/RealmSwift.framework", + "${BUILT_PRODUCTS_DIR}/RxCocoa-iOS/RxCocoa.framework", + "${BUILT_PRODUCTS_DIR}/RxRealm-iOS/RxRealm.framework", + "${BUILT_PRODUCTS_DIR}/RxRealmDataSources-iOS/RxRealmDataSources.framework", + "${BUILT_PRODUCTS_DIR}/RxSwift-iOS/RxSwift.framework", ); - name = "[CP] Check Pods Manifest.lock"; + name = "[CP] Embed Pods Frameworks"; outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-Demo-RxRealmDataSources_MacExample-checkManifestLockResult.txt", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Realm.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RealmSwift.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxCocoa.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxRealm.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxRealmDataSources.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSwift.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Demo-RxRealmDataSources_Example/Pods-Demo-RxRealmDataSources_Example-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 3954C9255BC6A9A3899B15EF /* [CP] Embed Pods Frameworks */ = { + 52A16AEA2F8FE7F6F8AB4685 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-Demo-RxRealmDataSources_MacExample/Pods-Demo-RxRealmDataSources_MacExample-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/Realm-macOS/Realm.framework", - "${BUILT_PRODUCTS_DIR}/RealmSwift-macOS/RealmSwift.framework", - "${BUILT_PRODUCTS_DIR}/RxCocoa-macOS/RxCocoa.framework", - "${BUILT_PRODUCTS_DIR}/RxRealm-macOS/RxRealm.framework", - "${BUILT_PRODUCTS_DIR}/RxRealmDataSources-macOS/RxRealmDataSources.framework", - "${BUILT_PRODUCTS_DIR}/RxSwift-macOS/RxSwift.framework", + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); - name = "[CP] Embed Pods Frameworks"; + name = "[CP] Check Pods Manifest.lock"; outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Realm.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RealmSwift.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxCocoa.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxRealm.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxRealmDataSources.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSwift.framework", + "$(DERIVED_FILE_DIR)/Pods-Demo-RxRealmDataSources_Example-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Demo-RxRealmDataSources_MacExample/Pods-Demo-RxRealmDataSources_MacExample-frameworks.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - E14D2B725468BD930A30E223 /* [CP] Embed Pods Frameworks */ = { + 9D0F92AD170E274992609D31 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-Demo-RxRealmDataSources_Example/Pods-Demo-RxRealmDataSources_Example-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/Realm-iOS/Realm.framework", - "${BUILT_PRODUCTS_DIR}/RealmSwift-iOS/RealmSwift.framework", - "${BUILT_PRODUCTS_DIR}/RxCocoa-iOS/RxCocoa.framework", - "${BUILT_PRODUCTS_DIR}/RxRealm-iOS/RxRealm.framework", - "${BUILT_PRODUCTS_DIR}/RxRealmDataSources-iOS/RxRealmDataSources.framework", - "${BUILT_PRODUCTS_DIR}/RxSwift-iOS/RxSwift.framework", + "${SRCROOT}/Pods/Target Support Files/Pods-Demo-RxRealmDataSources_MacExample/Pods-Demo-RxRealmDataSources_MacExample-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Realm-macOS/Realm.framework", + "${BUILT_PRODUCTS_DIR}/RealmSwift-macOS/RealmSwift.framework", + "${BUILT_PRODUCTS_DIR}/RxCocoa-macOS/RxCocoa.framework", + "${BUILT_PRODUCTS_DIR}/RxRealm-macOS/RxRealm.framework", + "${BUILT_PRODUCTS_DIR}/RxRealmDataSources-macOS/RxRealmDataSources.framework", + "${BUILT_PRODUCTS_DIR}/RxSwift-macOS/RxSwift.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( @@ -488,7 +478,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Demo-RxRealmDataSources_Example/Pods-Demo-RxRealmDataSources_Example-frameworks.sh\"\n"; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Demo-RxRealmDataSources_MacExample/Pods-Demo-RxRealmDataSources_MacExample-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -659,7 +649,7 @@ }; 607FACF01AFB9204008FA782 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 433CFEEAC500E1915E943474 /* Pods-Demo-RxRealmDataSources_Example.debug.xcconfig */; + baseConfigurationReference = 0369C60B6B5004A423A164C9 /* Pods-Demo-RxRealmDataSources_Example.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; @@ -677,7 +667,7 @@ }; 607FACF11AFB9204008FA782 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E709FF280BD1C0E98E09724E /* Pods-Demo-RxRealmDataSources_Example.release.xcconfig */; + baseConfigurationReference = 0F18398C20503792E18B6EC5 /* Pods-Demo-RxRealmDataSources_Example.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; @@ -695,7 +685,7 @@ }; 9C5B02DC1E1678C80009FBDE /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 608B2F81EBE23EAF84A87062 /* Pods-Demo-RxRealmDataSources_MacExample.debug.xcconfig */; + baseConfigurationReference = A049FE6F97A21C6D931D3A1C /* Pods-Demo-RxRealmDataSources_MacExample.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; @@ -720,7 +710,7 @@ }; 9C5B02DD1E1678C80009FBDE /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 6EBE80B271B15C2CEC56038E /* Pods-Demo-RxRealmDataSources_MacExample.release.xcconfig */; + baseConfigurationReference = 40C04A3DB3B2604895AEB697 /* Pods-Demo-RxRealmDataSources_MacExample.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; diff --git a/Example/RxRealmDataSources.xcodeproj/xcshareddata/xcschemes/RxRealmDataSources_MacExample.xcscheme b/Example/RxRealmDataSources.xcodeproj/xcshareddata/xcschemes/RxRealmDataSources_MacExample.xcscheme new file mode 100644 index 0000000..c848f66 --- /dev/null +++ b/Example/RxRealmDataSources.xcodeproj/xcshareddata/xcschemes/RxRealmDataSources_MacExample.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 89af35156e817022ca1c7de5ac63237abe3676db Mon Sep 17 00:00:00 2001 From: Loki Date: Fri, 28 Dec 2018 22:24:01 +0200 Subject: [PATCH 22/24] framework project --- .../Classes/Reactive+RxRealmDataSources.swift | 0 .../Classes/RealmBindObserver.swift | 0 .../RxCollectionViewRealmDataSource.swift | 0 .../Classes/RxOutlineViewRealmDataItem.swift | 0 .../RxOutlineViewRealmDataSource.swift | 0 .../Classes/RxTableViewRealmDataSource.swift | 0 .../project.pbxproj | 334 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../RxRealmDataSources/Info.plist | 24 ++ .../RxRealmDataSources/RxRealmDataSources.h | 19 + 11 files changed, 392 insertions(+) rename {Pod => RxRealmDataSources}/Classes/Reactive+RxRealmDataSources.swift (100%) rename {Pod => RxRealmDataSources}/Classes/RealmBindObserver.swift (100%) rename {Pod => RxRealmDataSources}/Classes/RxCollectionViewRealmDataSource.swift (100%) rename {Pod => RxRealmDataSources}/Classes/RxOutlineViewRealmDataItem.swift (100%) rename {Pod => RxRealmDataSources}/Classes/RxOutlineViewRealmDataSource.swift (100%) rename {Pod => RxRealmDataSources}/Classes/RxTableViewRealmDataSource.swift (100%) create mode 100644 RxRealmDataSources/RxRealmDataSources.xcodeproj/project.pbxproj create mode 100644 RxRealmDataSources/RxRealmDataSources.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 RxRealmDataSources/RxRealmDataSources.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 RxRealmDataSources/RxRealmDataSources/Info.plist create mode 100644 RxRealmDataSources/RxRealmDataSources/RxRealmDataSources.h diff --git a/Pod/Classes/Reactive+RxRealmDataSources.swift b/RxRealmDataSources/Classes/Reactive+RxRealmDataSources.swift similarity index 100% rename from Pod/Classes/Reactive+RxRealmDataSources.swift rename to RxRealmDataSources/Classes/Reactive+RxRealmDataSources.swift diff --git a/Pod/Classes/RealmBindObserver.swift b/RxRealmDataSources/Classes/RealmBindObserver.swift similarity index 100% rename from Pod/Classes/RealmBindObserver.swift rename to RxRealmDataSources/Classes/RealmBindObserver.swift diff --git a/Pod/Classes/RxCollectionViewRealmDataSource.swift b/RxRealmDataSources/Classes/RxCollectionViewRealmDataSource.swift similarity index 100% rename from Pod/Classes/RxCollectionViewRealmDataSource.swift rename to RxRealmDataSources/Classes/RxCollectionViewRealmDataSource.swift diff --git a/Pod/Classes/RxOutlineViewRealmDataItem.swift b/RxRealmDataSources/Classes/RxOutlineViewRealmDataItem.swift similarity index 100% rename from Pod/Classes/RxOutlineViewRealmDataItem.swift rename to RxRealmDataSources/Classes/RxOutlineViewRealmDataItem.swift diff --git a/Pod/Classes/RxOutlineViewRealmDataSource.swift b/RxRealmDataSources/Classes/RxOutlineViewRealmDataSource.swift similarity index 100% rename from Pod/Classes/RxOutlineViewRealmDataSource.swift rename to RxRealmDataSources/Classes/RxOutlineViewRealmDataSource.swift diff --git a/Pod/Classes/RxTableViewRealmDataSource.swift b/RxRealmDataSources/Classes/RxTableViewRealmDataSource.swift similarity index 100% rename from Pod/Classes/RxTableViewRealmDataSource.swift rename to RxRealmDataSources/Classes/RxTableViewRealmDataSource.swift diff --git a/RxRealmDataSources/RxRealmDataSources.xcodeproj/project.pbxproj b/RxRealmDataSources/RxRealmDataSources.xcodeproj/project.pbxproj new file mode 100644 index 0000000..8d61b52 --- /dev/null +++ b/RxRealmDataSources/RxRealmDataSources.xcodeproj/project.pbxproj @@ -0,0 +1,334 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + E6CEF4FD21D6BD82004D0FF0 /* RxRealmDataSources.h in Headers */ = {isa = PBXBuildFile; fileRef = E6CEF4FB21D6BD82004D0FF0 /* RxRealmDataSources.h */; settings = {ATTRIBUTES = (Public, ); }; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + E6CEF4F821D6BD82004D0FF0 /* RxRealmDataSources.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxRealmDataSources.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + E6CEF4FB21D6BD82004D0FF0 /* RxRealmDataSources.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RxRealmDataSources.h; sourceTree = ""; }; + E6CEF4FC21D6BD82004D0FF0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + E6CEF4F521D6BD82004D0FF0 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + E6CEF4EE21D6BD82004D0FF0 = { + isa = PBXGroup; + children = ( + E6CEF4FA21D6BD82004D0FF0 /* RxRealmDataSources */, + E6CEF4F921D6BD82004D0FF0 /* Products */, + ); + sourceTree = ""; + }; + E6CEF4F921D6BD82004D0FF0 /* Products */ = { + isa = PBXGroup; + children = ( + E6CEF4F821D6BD82004D0FF0 /* RxRealmDataSources.framework */, + ); + name = Products; + sourceTree = ""; + }; + E6CEF4FA21D6BD82004D0FF0 /* RxRealmDataSources */ = { + isa = PBXGroup; + children = ( + E6CEF4FB21D6BD82004D0FF0 /* RxRealmDataSources.h */, + E6CEF4FC21D6BD82004D0FF0 /* Info.plist */, + ); + path = RxRealmDataSources; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + E6CEF4F321D6BD82004D0FF0 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + E6CEF4FD21D6BD82004D0FF0 /* RxRealmDataSources.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + E6CEF4F721D6BD82004D0FF0 /* RxRealmDataSources */ = { + isa = PBXNativeTarget; + buildConfigurationList = E6CEF50021D6BD82004D0FF0 /* Build configuration list for PBXNativeTarget "RxRealmDataSources" */; + buildPhases = ( + E6CEF4F321D6BD82004D0FF0 /* Headers */, + E6CEF4F421D6BD82004D0FF0 /* Sources */, + E6CEF4F521D6BD82004D0FF0 /* Frameworks */, + E6CEF4F621D6BD82004D0FF0 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = RxRealmDataSources; + productName = RxRealmDataSources; + productReference = E6CEF4F821D6BD82004D0FF0 /* RxRealmDataSources.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + E6CEF4EF21D6BD82004D0FF0 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1010; + ORGANIZATIONNAME = Rx; + TargetAttributes = { + E6CEF4F721D6BD82004D0FF0 = { + CreatedOnToolsVersion = 10.1; + }; + }; + }; + buildConfigurationList = E6CEF4F221D6BD82004D0FF0 /* Build configuration list for PBXProject "RxRealmDataSources" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = E6CEF4EE21D6BD82004D0FF0; + productRefGroup = E6CEF4F921D6BD82004D0FF0 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + E6CEF4F721D6BD82004D0FF0 /* RxRealmDataSources */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + E6CEF4F621D6BD82004D0FF0 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + E6CEF4F421D6BD82004D0FF0 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + E6CEF4FE21D6BD82004D0FF0 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + E6CEF4FF21D6BD82004D0FF0 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + E6CEF50121D6BD82004D0FF0 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_VERSION = A; + INFOPLIST_FILE = RxRealmDataSources/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = Rx.RxRealmDataSources; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_VERSION = 4.2; + }; + name = Debug; + }; + E6CEF50221D6BD82004D0FF0 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + FRAMEWORK_VERSION = A; + INFOPLIST_FILE = RxRealmDataSources/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = Rx.RxRealmDataSources; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_VERSION = 4.2; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + E6CEF4F221D6BD82004D0FF0 /* Build configuration list for PBXProject "RxRealmDataSources" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E6CEF4FE21D6BD82004D0FF0 /* Debug */, + E6CEF4FF21D6BD82004D0FF0 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + E6CEF50021D6BD82004D0FF0 /* Build configuration list for PBXNativeTarget "RxRealmDataSources" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + E6CEF50121D6BD82004D0FF0 /* Debug */, + E6CEF50221D6BD82004D0FF0 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = E6CEF4EF21D6BD82004D0FF0 /* Project object */; +} diff --git a/RxRealmDataSources/RxRealmDataSources.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/RxRealmDataSources/RxRealmDataSources.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..45db376 --- /dev/null +++ b/RxRealmDataSources/RxRealmDataSources.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/RxRealmDataSources/RxRealmDataSources.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/RxRealmDataSources/RxRealmDataSources.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/RxRealmDataSources/RxRealmDataSources.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/RxRealmDataSources/RxRealmDataSources/Info.plist b/RxRealmDataSources/RxRealmDataSources/Info.plist new file mode 100644 index 0000000..d55b5c1 --- /dev/null +++ b/RxRealmDataSources/RxRealmDataSources/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSHumanReadableCopyright + Copyright © 2018 Rx. All rights reserved. + + diff --git a/RxRealmDataSources/RxRealmDataSources/RxRealmDataSources.h b/RxRealmDataSources/RxRealmDataSources/RxRealmDataSources.h new file mode 100644 index 0000000..b15317f --- /dev/null +++ b/RxRealmDataSources/RxRealmDataSources/RxRealmDataSources.h @@ -0,0 +1,19 @@ +// +// RxRealmDataSources.h +// RxRealmDataSources +// +// Created by Loki on 12/28/18. +// Copyright © 2018 Rx. All rights reserved. +// + +#import + +//! Project version number for RxRealmDataSources. +FOUNDATION_EXPORT double RxRealmDataSourcesVersionNumber; + +//! Project version string for RxRealmDataSources. +FOUNDATION_EXPORT const unsigned char RxRealmDataSourcesVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + From 0bab87cb0d8b2bd1edea758e736e17eb53f9c681 Mon Sep 17 00:00:00 2001 From: Loki Date: Fri, 28 Dec 2018 22:24:08 +0200 Subject: [PATCH 23/24] fix --- .../project.pbxproj | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/RxRealmDataSources/RxRealmDataSources.xcodeproj/project.pbxproj b/RxRealmDataSources/RxRealmDataSources.xcodeproj/project.pbxproj index 8d61b52..5474313 100644 --- a/RxRealmDataSources/RxRealmDataSources.xcodeproj/project.pbxproj +++ b/RxRealmDataSources/RxRealmDataSources.xcodeproj/project.pbxproj @@ -8,12 +8,24 @@ /* Begin PBXBuildFile section */ E6CEF4FD21D6BD82004D0FF0 /* RxRealmDataSources.h in Headers */ = {isa = PBXBuildFile; fileRef = E6CEF4FB21D6BD82004D0FF0 /* RxRealmDataSources.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E6CEF50921D6BD9E004D0FF0 /* RxCollectionViewRealmDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6CEF50321D6BD9E004D0FF0 /* RxCollectionViewRealmDataSource.swift */; }; + E6CEF50A21D6BD9E004D0FF0 /* RxOutlineViewRealmDataItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6CEF50421D6BD9E004D0FF0 /* RxOutlineViewRealmDataItem.swift */; }; + E6CEF50B21D6BD9E004D0FF0 /* RxOutlineViewRealmDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6CEF50521D6BD9E004D0FF0 /* RxOutlineViewRealmDataSource.swift */; }; + E6CEF50C21D6BD9E004D0FF0 /* RxTableViewRealmDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6CEF50621D6BD9E004D0FF0 /* RxTableViewRealmDataSource.swift */; }; + E6CEF50D21D6BD9E004D0FF0 /* Reactive+RxRealmDataSources.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6CEF50721D6BD9E004D0FF0 /* Reactive+RxRealmDataSources.swift */; }; + E6CEF50E21D6BD9E004D0FF0 /* RealmBindObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6CEF50821D6BD9E004D0FF0 /* RealmBindObserver.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ E6CEF4F821D6BD82004D0FF0 /* RxRealmDataSources.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxRealmDataSources.framework; sourceTree = BUILT_PRODUCTS_DIR; }; E6CEF4FB21D6BD82004D0FF0 /* RxRealmDataSources.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RxRealmDataSources.h; sourceTree = ""; }; E6CEF4FC21D6BD82004D0FF0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + E6CEF50321D6BD9E004D0FF0 /* RxCollectionViewRealmDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RxCollectionViewRealmDataSource.swift; sourceTree = ""; }; + E6CEF50421D6BD9E004D0FF0 /* RxOutlineViewRealmDataItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RxOutlineViewRealmDataItem.swift; sourceTree = ""; }; + E6CEF50521D6BD9E004D0FF0 /* RxOutlineViewRealmDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RxOutlineViewRealmDataSource.swift; sourceTree = ""; }; + E6CEF50621D6BD9E004D0FF0 /* RxTableViewRealmDataSource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RxTableViewRealmDataSource.swift; sourceTree = ""; }; + E6CEF50721D6BD9E004D0FF0 /* Reactive+RxRealmDataSources.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Reactive+RxRealmDataSources.swift"; sourceTree = ""; }; + E6CEF50821D6BD9E004D0FF0 /* RealmBindObserver.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RealmBindObserver.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -30,6 +42,7 @@ E6CEF4EE21D6BD82004D0FF0 = { isa = PBXGroup; children = ( + E6CEF50F21D6BDB4004D0FF0 /* Classes */, E6CEF4FA21D6BD82004D0FF0 /* RxRealmDataSources */, E6CEF4F921D6BD82004D0FF0 /* Products */, ); @@ -52,6 +65,19 @@ path = RxRealmDataSources; sourceTree = ""; }; + E6CEF50F21D6BDB4004D0FF0 /* Classes */ = { + isa = PBXGroup; + children = ( + E6CEF50721D6BD9E004D0FF0 /* Reactive+RxRealmDataSources.swift */, + E6CEF50821D6BD9E004D0FF0 /* RealmBindObserver.swift */, + E6CEF50321D6BD9E004D0FF0 /* RxCollectionViewRealmDataSource.swift */, + E6CEF50421D6BD9E004D0FF0 /* RxOutlineViewRealmDataItem.swift */, + E6CEF50521D6BD9E004D0FF0 /* RxOutlineViewRealmDataSource.swift */, + E6CEF50621D6BD9E004D0FF0 /* RxTableViewRealmDataSource.swift */, + ); + path = Classes; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -95,6 +121,7 @@ TargetAttributes = { E6CEF4F721D6BD82004D0FF0 = { CreatedOnToolsVersion = 10.1; + LastSwiftMigration = 1010; }; }; }; @@ -130,6 +157,12 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + E6CEF50E21D6BD9E004D0FF0 /* RealmBindObserver.swift in Sources */, + E6CEF50C21D6BD9E004D0FF0 /* RxTableViewRealmDataSource.swift in Sources */, + E6CEF50A21D6BD9E004D0FF0 /* RxOutlineViewRealmDataItem.swift in Sources */, + E6CEF50D21D6BD9E004D0FF0 /* Reactive+RxRealmDataSources.swift in Sources */, + E6CEF50921D6BD9E004D0FF0 /* RxCollectionViewRealmDataSource.swift in Sources */, + E6CEF50B21D6BD9E004D0FF0 /* RxOutlineViewRealmDataSource.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -260,6 +293,7 @@ E6CEF50121D6BD82004D0FF0 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; @@ -278,6 +312,7 @@ PRODUCT_BUNDLE_IDENTIFIER = Rx.RxRealmDataSources; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.2; }; name = Debug; @@ -285,6 +320,7 @@ E6CEF50221D6BD82004D0FF0 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; From dd74c7926aeb6059026c55639f52e1f9073518c4 Mon Sep 17 00:00:00 2001 From: Loki Date: Fri, 28 Dec 2018 22:27:03 +0200 Subject: [PATCH 24/24] ... --- RxRealmDataSources.xcodeproj | Bin 0 -> 1016 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 RxRealmDataSources.xcodeproj diff --git a/RxRealmDataSources.xcodeproj b/RxRealmDataSources.xcodeproj new file mode 100644 index 0000000000000000000000000000000000000000..cb841f64b02390153ee819874337f1751c52e463 GIT binary patch literal 1016 zcmZ{iJ51YP5Xa9vTG&jeC<9V0)R8nM#Uf#Wgb;zs#3N#9gCSoyDHoOuY!|1%9; z60N{?K|3(m*ONg|)34q0Kd7lt{^RLP*uR&5JDCmTUmX1j`Lp61i1M5sYz_JYdJ83- zlMXeYCY0yo^G$izuRf1o<@&htacb z#bPn8;a$yQZ_}CPyX0NI`Hoy;p7*)4L-fiBcqw;(R4aJ9F4~_ z@x-u|vXWUVn0=q$f!_3nEywuVG1w$C{;jZ8Tmky^Y+D6m`_fqcI3(Syc!XYm>-9SK zW$A