Skip to content

Commit

Permalink
Merge pull request #3 from fraune/rxswift-update
Browse files Browse the repository at this point in the history
Update to RxSwift 6
  • Loading branch information
fraune authored Feb 8, 2024
2 parents 57220b8 + a193a3c commit 59d4a06
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let package = Package(
.library(name: "RxBluetoothKit", targets: ["RxBluetoothKit"])
],
dependencies: [
.package(url: "https://github.com/ReactiveX/RxSwift.git", .upToNextMajor(from: "5.1.1"))
.package(url: "https://github.com/ReactiveX/RxSwift.git", .upToNextMajor(from: "6.0.0"))
],
targets: [
.target(
Expand Down
2 changes: 1 addition & 1 deletion Source/CentralManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ public class CentralManager: ManagerType {
return (peripheral, error)
}
return ensure(.poweredOn, observable: observable)
.catchError { error in
.catch { error in
if error is BluetoothError, let peripheral = peripheral {
return .concat(.just((peripheral, error)), .error(error))
} else {
Expand Down
4 changes: 2 additions & 2 deletions Source/Logging.swift
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ extension Reactive where Base == RxBluetoothKitLog {
*/
public var log: Observable<String> {
return RxBluetoothKitLog.subject.asObserver()
.observeOn(MainScheduler.instance)
.catchErrorJustReturn("")
.observe(on: MainScheduler.instance)
.catchAndReturn("")
.share(scope: .whileConnected)
}
}

0 comments on commit 59d4a06

Please sign in to comment.