Skip to content

Commit 63d00c6

Browse files
authored
fix: update Realm and RxSwift to latest version (#178)
* fix: update realm to v10.21.0 * fix: update dependencies * chore: use latest xcode * chore: update package.swift
1 parent 23ec894 commit 63d00c6

File tree

9 files changed

+49
-41
lines changed

9 files changed

+49
-41
lines changed

.github/workflows/pull_request.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@ on:
66

77
jobs:
88
build:
9-
runs-on: macos-11.0
9+
runs-on: macos-latest
1010

1111
steps:
12+
- uses: maxim-lobanov/setup-xcode@v1
13+
with:
14+
xcode-version: latest-stable
15+
1216
- uses: actions/checkout@v2
1317
with:
1418
fetch-depth: 0

Cartfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
github "realm/realm-cocoa" ~> 10.5
1+
github "realm/realm-cocoa" ~> 10.21
22
github "ReactiveX/RxSwift" ~> 6.1

Cartfile.resolved

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
github "ReactiveX/RxSwift" "6.0.0"
2-
github "realm/realm-cocoa" "v10.5.0"
1+
github "ReactiveX/RxSwift" "6.5.0"
2+
github "realm/realm-cocoa" "v10.21.1"

Examples/Podfile.lock

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
PODS:
2-
- Realm (10.7.4):
3-
- Realm/Headers (= 10.7.4)
4-
- Realm/Headers (10.7.4)
5-
- RealmSwift (10.7.4):
6-
- Realm (= 10.7.4)
7-
- RxCocoa (6.1.0):
8-
- RxRelay (= 6.1.0)
9-
- RxSwift (= 6.1.0)
10-
- RxRealm (5.0.1):
11-
- Realm (~> 10.7)
12-
- RealmSwift (~> 10.7)
13-
- RxCocoa (~> 6.0)
14-
- RxSwift (~> 6.0)
15-
- RxRelay (6.1.0):
16-
- RxSwift (= 6.1.0)
17-
- RxSwift (6.1.0)
2+
- Realm (10.21.1):
3+
- Realm/Headers (= 10.21.1)
4+
- Realm/Headers (10.21.1)
5+
- RealmSwift (10.21.1):
6+
- Realm (= 10.21.1)
7+
- RxCocoa (6.5.0):
8+
- RxRelay (= 6.5.0)
9+
- RxSwift (= 6.5.0)
10+
- RxRealm (5.0.4):
11+
- Realm (~> 10.21)
12+
- RealmSwift (~> 10.21)
13+
- RxCocoa (~> 6.1)
14+
- RxSwift (~> 6.1)
15+
- RxRelay (6.5.0):
16+
- RxSwift (= 6.5.0)
17+
- RxSwift (6.5.0)
1818

1919
DEPENDENCIES:
2020
- RxRealm (from `../`)
@@ -32,13 +32,13 @@ EXTERNAL SOURCES:
3232
:path: "../"
3333

3434
SPEC CHECKSUMS:
35-
Realm: f08ce1a85649a41303ecfe1cbd914c62e9e6d710
36-
RealmSwift: 60ec49d165f23d040ab48811d8dd177e09baf4d3
37-
RxCocoa: 5c51f02d562cbd94629f6c26cf0c80fe4ab8d343
38-
RxRealm: fc4a4bc4956f2b7be27412a22eda143785da0c85
39-
RxRelay: 483e1a19fad961b41f0b0c0bee506f46c1ae14fe
40-
RxSwift: a834e5c538e89eca0cae86f403f4fbf0336786ce
35+
Realm: 44b41c3ae39e3ecfded71a04434bfde066c7b317
36+
RealmSwift: dbf9a4eb06e0c929d51c4ef2e8f951bca541feab
37+
RxCocoa: 94f817b71c07517321eb4f9ad299112ca8af743b
38+
RxRealm: 666c8785327fe2fff972a3093b35dc7055c1ca38
39+
RxRelay: 1de1523e604c72b6c68feadedd1af3b1b4d0ecbd
40+
RxSwift: 5710a9e6b17f3c3d6e40d6e559b9fa1e813b2ef8
4141

4242
PODFILE CHECKSUM: c18aa0767a67d16eff537312e81255933c8a0f4e
4343

44-
COCOAPODS: 1.10.1
44+
COCOAPODS: 1.11.2

Package.resolved

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Package.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ let package = Package(name: "RxRealm",
1515

1616
dependencies: [
1717
// Dependencies declare other packages that this package depends on.
18-
.package(url: "https://github.com/realm/realm-cocoa.git", .upToNextMajor(from: "10.5.0")),
19-
.package(url: "https://github.com/ReactiveX/RxSwift.git", .upToNextMajor(from: "6.1.0"))
18+
.package(url: "https://github.com/realm/realm-cocoa.git", .upToNextMajor(from: "10.21.1")),
19+
.package(url: "https://github.com/ReactiveX/RxSwift.git", .upToNextMajor(from: "6.5.0"))
2020
],
2121

2222
targets: [

RxRealm.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ Pod::Spec.new do |s|
2424
s.source_files = "Sources/RxRealm/*.swift"
2525

2626
s.frameworks = "Foundation"
27-
s.dependency "Realm", "~> 10.7"
28-
s.dependency "RealmSwift", "~> 10.7"
27+
s.dependency "Realm", "~> 10.21"
28+
s.dependency "RealmSwift", "~> 10.21"
2929
s.dependency "RxSwift", "~> 6.1"
3030
s.dependency "RxCocoa", "~> 6.1"
3131
end

Sources/RxRealm/RxRealm.swift

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ public protocol NotificationEmitter {
3232

3333
- returns: `NotificationToken` - retain this value to keep notifications being emitted for the current collection.
3434
*/
35-
func observe(on queue: DispatchQueue?, _ block: @escaping (RealmCollectionChange<Self>) -> Void) -> NotificationToken
35+
func observe(keyPaths: [String]?,
36+
on queue: DispatchQueue?,
37+
_ block: @escaping (RealmCollectionChange<Self>) -> Void) -> NotificationToken
3638

3739
func toArray() -> [ElementType]
3840

@@ -111,18 +113,20 @@ public extension ObservableType where Element: NotificationEmitter {
111113

112114
- parameter from: A Realm collection of type `Element`: either `Results`, `List`, `LinkingObjects` or `AnyRealmCollection`.
113115
- parameter synchronousStart: whether the resulting `Observable` should emit its first element synchronously (e.g. better for UI bindings)
116+
- parameter keyPaths: Only properties contained in the key paths array will trigger
117+
the block when they are modified. See description above for more detail on linked properties.
114118
- parameter queue: The serial dispatch queue to receive notification on. If `nil`, notifications are delivered to the current thread.
115119

116120
- returns: `Observable<Element>`, e.g. when called on `Results<Model>` it will return `Observable<Results<Model>>`, on a `List<User>` it will return `Observable<List<User>>`, etc.
117121
*/
118-
static func collection(from collection: Element, synchronousStart: Bool = true, on queue: DispatchQueue? = nil)
122+
static func collection(from collection: Element, synchronousStart: Bool = true, keyPaths: [String]? = nil, on queue: DispatchQueue? = nil)
119123
-> Observable<Element> {
120124
return Observable.create { observer in
121125
if synchronousStart {
122126
observer.onNext(collection)
123127
}
124128

125-
let token = collection.observe(on: queue) { changeset in
129+
let token = collection.observe(keyPaths: keyPaths, on: queue) { changeset in
126130

127131
let value: Element
128132

project-spm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ packages:
9898
from: 6.0.0
9999
Realm:
100100
url: https://github.com/realm/realm-cocoa.git
101-
from: 10.5.0
101+
from: 10.21.1
102102
targets:
103103
RxRealm iOS:
104104
settings:

0 commit comments

Comments
 (0)