Skip to content

Commit d950933

Browse files
committed
project: bump to rxswift 6.0.0
1 parent f586fec commit d950933

19 files changed

+51
-41
lines changed

.swiftlint.yml

+1-12
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
included:
22
- RxFlow
3-
excluded:
4-
- Carthage
5-
- Pods
63
analyzer_rules:
74
disabled_rules:
85
- large_tuple
96
- unused_declaration
10-
- file_header
7+
- unused_import
118
opt_in_rules:
129
- anyobject_protocol
1310
- array_init
@@ -25,7 +22,6 @@ opt_in_rules:
2522
- explicit_init
2623
- extension_access_modifier
2724
- fallthrough
28-
- file_header
2925
- first_where
3026
- flatmap_over_map_reduce
3127
- identical_operands
@@ -83,10 +79,3 @@ identifier_name:
8379
- id
8480
number_separator:
8581
minimum_length: 5
86-
file_name:
87-
excluded:
88-
- main.swift
89-
- LinuxMain.swift
90-
- TestHelpers.swift
91-
- shim.swift
92-
- AutomaticRuleTests.generated.swift

Cartfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github "ReactiveX/RxSwift" ~> 5.1.1
1+
github "ReactiveX/RxSwift" ~> 6.0.0

Cartfile.resolved

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github "ReactiveX/RxSwift" "5.1.1"
1+
github "ReactiveX/RxSwift" "6.0.0"

Package.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ let package = Package(
99
.library(name: "RxFlow", targets: ["RxFlow"]),
1010
],
1111
dependencies: [
12-
.package(url: "https://github.com/ReactiveX/RxSwift.git", .upToNextMajor(from: "5.1.1")),
12+
.package(url: "https://github.com/ReactiveX/RxSwift.git", .upToNextMajor(from: "6.0.0")),
1313
],
1414
targets: [
1515
.target(

RxFlow.podspec

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "RxFlow"
3-
s.version = "2.11.0"
3+
s.version = "2.12.0"
44
s.swift_version = '5.3'
55
s.summary = "RxFlow is a navigation framework for iOS applications, based on a Reactive Coordinator pattern."
66

@@ -27,6 +27,6 @@ RxFlow aims to
2727
s.source_files = "RxFlow/**/*.swift"
2828
s.frameworks = "UIKit"
2929
s.requires_arc = true
30-
s.dependency "RxSwift", ">= 5.1.1"
31-
s.dependency "RxCocoa", ">= 5.1.1"
30+
s.dependency "RxSwift", ">= 6.0.0"
31+
s.dependency "RxCocoa", ">= 6.0.0"
3232
end

RxFlow.xcodeproj/project.pbxproj

+2
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,7 @@
505505
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
506506
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
507507
SWIFT_VERSION = 4.2;
508+
VALIDATE_WORKSPACE = NO;
508509
VERSIONING_SYSTEM = "apple-generic";
509510
VERSION_INFO_PREFIX = "";
510511
};
@@ -562,6 +563,7 @@
562563
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
563564
SWIFT_VERSION = 4.2;
564565
VALIDATE_PRODUCT = YES;
566+
VALIDATE_WORKSPACE = NO;
565567
VERSIONING_SYSTEM = "apple-generic";
566568
VERSION_INFO_PREFIX = "";
567569
};

RxFlow/FlowCoordinator.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public final class FlowCoordinator: NSObject {
4646
// listen for the internal steps relay that aggregates the flow's Stepper's steps and
4747
// the FlowContributors's Stepper's steps
4848
self.stepsRelay
49-
.takeUntil(allowStepWhenDismissed ? .empty() : flow.rxDismissed.asObservable())
49+
.take(until: allowStepWhenDismissed ? .empty() : flow.rxDismissed.asObservable())
5050
.do(onDispose: { [weak self] in
5151
self?.childFlowCoordinators.removeAll()
5252
self?.parentFlowCoordinator?.childFlowCoordinators.removeValue(forKey: self?.identifier ?? "")
@@ -106,7 +106,7 @@ public final class FlowCoordinator: NSObject {
106106
.do(onSubscribed: { stepper.readyToEmitSteps() })
107107
.startWith(stepper.initialStep)
108108
.filter { !($0 is NoneStep) }
109-
.takeUntil(allowStepWhenDismissed ? .empty() : flow.rxDismissed.asObservable())
109+
.take(until: allowStepWhenDismissed ? .empty() : flow.rxDismissed.asObservable())
110110
// for now commenting this line to allow a Stepper trigger "dismissing" steps
111111
// even if a flow is displayed on top of it
112112
// .pausable(afterCount: 1, withPauser: flow.rxVisible)
@@ -177,7 +177,7 @@ public final class FlowCoordinator: NSObject {
177177
.do(onSubscribed: { nextPresentableAndStepper.stepper.readyToEmitSteps() })
178178
.startWith(nextPresentableAndStepper.stepper.initialStep)
179179
.filter { !($0 is NoneStep) }
180-
.takeUntil(allowStepWhenDismissed ? .empty() : nextPresentableAndStepper.presentable.rxDismissed.asObservable())
180+
.take(until: allowStepWhenDismissed ? .empty() : nextPresentableAndStepper.presentable.rxDismissed.asObservable())
181181

182182
// by default we cannot accept steps from a presentable that is not visible
183183
if nextPresentableAndStepper.allowStepWhenNotPresented == false {

RxFlowDemo/Cartfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
github "ReactiveX/RxSwift" ~> 5.1.1
1+
github "ReactiveX/RxSwift" ~> 6.0.0
22
github "AliSoftware/Reusable" ~> 4.0.5

RxFlowDemo/Cartfile.resolved

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
github "AliSoftware/Reusable" "4.1.1"
2-
github "ReactiveX/RxSwift" "5.1.1"
2+
github "ReactiveX/RxSwift" "6.0.0"

RxFlowDemo/RxFlowDemo/Features/Dashboard/Wishlist/WishlistViewController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class WishlistViewController: UIViewController, StoryboardBased, ViewModelBased
2727

2828
_ = Observable<Int>
2929
.interval(.seconds(5), scheduler: MainScheduler.instance)
30-
.takeUntil(self.rx.deallocating)
30+
.take(until: self.rx.deallocating)
3131
.map { _ in return DemoStep.fakeStep }
3232
.bind(to: self.steps)
3333
}

RxFlowDemo/RxFlowDemo/Features/Settings/SettingsApiKeyViewController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class SettingsApiKeyViewController: UIViewController, StoryboardBased, ViewModel
2323

2424
// Do any additional setup after loading the view.
2525
_ = proceedButton.rx.tap
26-
.takeUntil(self.rx.deallocating)
26+
.take(until: self.rx.deallocating)
2727
.subscribe(onNext: { [unowned self] _ in
2828
self.viewModel.setApiKey()
2929
})

RxFlowDemo/RxFlowDemo/Features/Settings/SettingsListViewController.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ class SettingsListViewController: UITableViewController, StoryboardBased, Steppe
3131
super.viewDidLoad()
3232

3333
_ = Observable.of(settings)
34-
.takeUntil(self.rx.deallocating)
34+
.take(until: self.rx.deallocating)
3535
.bind(to: tableView.rx.items(cellIdentifier: "SettingCell")) { _, element, cell in
3636
cell.textLabel?.text = element.title
3737
}
3838

3939
_ = tableView.rx.modelSelected(SettingItem.self)
40-
.takeUntil(self.rx.deallocating)
40+
.take(until: self.rx.deallocating)
4141
.map { $0.step }
4242
.bind(to: self.steps)
4343
}

RxFlowDemo/RxFlowDemo/Features/Settings/SettingsLoginViewController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class SettingsLoginViewController: UIViewController, StoryboardBased, Stepper {
2323

2424
// Do any additional setup after loading the view.
2525
_ = proceedButton.rx.tap
26-
.takeUntil(self.rx.deallocating)
26+
.take(until: self.rx.deallocating)
2727
.map { DemoStep.userIsLoggedIn }
2828
.bind(to: self.steps)
2929
}

RxFlowDemo/xcarthage.sh

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# carthage-build.sh
2+
# Usage example: ./carthage-build.sh --platform iOS
3+
4+
set -euo pipefail
5+
6+
xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX)
7+
trap 'rm -f "$xcconfig"' INT TERM HUP EXIT
8+
9+
# For Xcode 12 make sure EXCLUDED_ARCHS is set to arm architectures otherwise
10+
# the build will fail on lipo due to duplicate architectures.
11+
12+
CURRENT_XCODE_VERSION=$(xcodebuild -version | grep "Build version" | cut -d' ' -f3)
13+
echo "EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_$CURRENT_XCODE_VERSION = arm64 arm64e armv7 armv7s armv6 armv8" >> $xcconfig
14+
15+
echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200 = $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_$(XCODE_PRODUCT_BUILD_VERSION))' >> $xcconfig
16+
echo 'EXCLUDED_ARCHS = $(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)__XCODE_$(XCODE_VERSION_MAJOR))' >> $xcconfig
17+
18+
export XCODE_XCCONFIG_FILE="$xcconfig"
19+
carthage update "$@"

RxFlowTests/Flow+PresentableTests.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ final class Flow_PresentableTests: XCTestCase {
3434
let testScheduler = TestScheduler(initialClock: 0)
3535
let observer = testScheduler.createObserver(Bool.self)
3636
testScheduler.start()
37-
_ = testFlow.rxVisible.asObservable().takeUntil(self.rx.deallocating).bind(to: observer)
37+
_ = testFlow.rxVisible.asObservable().take(until: self.rx.deallocating).bind(to: observer)
3838

3939
// When: Displaying/Hiding it 3 times
4040
testFlow.rootViewController.viewDidAppear(false)
@@ -60,7 +60,7 @@ final class Flow_PresentableTests: XCTestCase {
6060
let testScheduler = TestScheduler(initialClock: 0)
6161
let observer = testScheduler.createObserver(Void.self)
6262
testScheduler.start()
63-
_ = testFlow.rxDismissed.asObservable().takeUntil(self.rx.deallocating).bind(to: observer)
63+
_ = testFlow.rxDismissed.asObservable().take(until: self.rx.deallocating).bind(to: observer)
6464

6565
// When: Dismissing the Flow
6666
testFlow.rootViewController.didMove(toParent: nil)

RxFlowTests/ObservableType+PausableTests.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ final class ObservableType_PausableTests: XCTestCase {
1919

2020
// When: executing the sequence
2121
let values = try emitter
22-
.takeUntil(self.rx.deallocated)
22+
.take(until: self.rx.deallocated)
2323
.do(onNext: { (value) in
2424
pauserSubject.onNext((value % 2) == 0)
2525
})
@@ -37,7 +37,7 @@ final class ObservableType_PausableTests: XCTestCase {
3737

3838
// When: executing the sequence
3939
let values = try emitter
40-
.takeUntil(self.rx.deallocated)
40+
.take(until: self.rx.deallocated)
4141
.do(onNext: { (value) in
4242
pauserSubject.onNext((value % 2) == 0)
4343
})

RxFlowTests/StepperTests.swift

+6-6
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ final class StepperTests: XCTestCase {
6060
let stepperClass = StepperClass(with: StepperTestsStep.stepOne, andNextStep: StepperTestsStep.stepTwo)
6161
let testScheduler = TestScheduler(initialClock: 0)
6262
let observer = testScheduler.createObserver(Step.self)
63-
_ = stepperClass.steps.takeUntil(self.rx.deallocating).bind(to: observer)
63+
_ = stepperClass.steps.take(until: self.rx.deallocating).bind(to: observer)
6464
testScheduler.start()
6565

6666
// When: emitting a new step
@@ -78,7 +78,7 @@ final class StepperTests: XCTestCase {
7878
let stepperClass = OneStepper(withSingleStep: StepperTestsStep.stepOne)
7979
let testScheduler = TestScheduler(initialClock: 0)
8080
let observer = testScheduler.createObserver(Step.self)
81-
_ = stepperClass.steps.takeUntil(self.rx.deallocating).bind(to: observer)
81+
_ = stepperClass.steps.take(until: self.rx.deallocating).bind(to: observer)
8282
testScheduler.start()
8383

8484
// When: emitting the initial step
@@ -94,7 +94,7 @@ final class StepperTests: XCTestCase {
9494
let stepperClass = NoneStepper()
9595
let testScheduler = TestScheduler(initialClock: 0)
9696
let observer = testScheduler.createObserver(Step.self)
97-
_ = stepperClass.steps.takeUntil(self.rx.deallocating).bind(to: observer)
97+
_ = stepperClass.steps.take(until: self.rx.deallocating).bind(to: observer)
9898
testScheduler.start()
9999

100100
// When: emitting the initial step
@@ -113,7 +113,7 @@ final class StepperTests: XCTestCase {
113113
let compositeStepper = CompositeStepper(steppers: stepsToEmit.map { OneStepper(withSingleStep: $0) })
114114
let testScheduler = TestScheduler(initialClock: 0)
115115
let observer = testScheduler.createObserver(Step.self)
116-
_ = compositeStepper.steps.takeUntil(self.rx.deallocating).bind(to: observer)
116+
_ = compositeStepper.steps.take(until: self.rx.deallocating).bind(to: observer)
117117
testScheduler.start()
118118

119119
// When: launching the steps sequence
@@ -151,7 +151,7 @@ final class StepperTests: XCTestCase {
151151
let compositeStepper = CompositeStepper(steppers: stepperClasses)
152152
let testScheduler = TestScheduler(initialClock: 0)
153153
let observer = testScheduler.createObserver(Step.self)
154-
_ = compositeStepper.steps.takeUntil(self.rx.deallocating).bind(to: observer)
154+
_ = compositeStepper.steps.take(until: self.rx.deallocating).bind(to: observer)
155155
testScheduler.start()
156156

157157
// When: launching the steps sequence
@@ -178,7 +178,7 @@ final class StepperTests: XCTestCase {
178178
let compositeStepper = CustomCompositeStepper(with: StepperTestsStep.stepReference, andSteppers: stepperClasses)
179179
let testScheduler = TestScheduler(initialClock: 0)
180180
let observer = testScheduler.createObserver(Step.self)
181-
_ = compositeStepper.steps.takeUntil(self.rx.deallocating).bind(to: observer)
181+
_ = compositeStepper.steps.take(until: self.rx.deallocating).bind(to: observer)
182182
testScheduler.start()
183183

184184
// When: launching the steps sequence

RxFlowTests/UIViewController+PresentableTests.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ final class UIViewController_PresentableTests: XCTestCase {
2222
let testScheduler = TestScheduler(initialClock: 0)
2323
let observer = testScheduler.createObserver(Bool.self)
2424
testScheduler.start()
25-
_ = viewController.rxVisible.asObservable().takeUntil(self.rx.deallocating).bind(to: observer)
25+
_ = viewController.rxVisible.asObservable().take(until: self.rx.deallocating).bind(to: observer)
2626

2727
// When: Displaying/Hiding it 3 times
2828
viewController.viewDidAppear(false)
@@ -48,7 +48,7 @@ final class UIViewController_PresentableTests: XCTestCase {
4848
let testScheduler = TestScheduler(initialClock: 0)
4949
let observer = testScheduler.createObserver(Void.self)
5050
testScheduler.start()
51-
_ = viewController.rxDismissed.asObservable().takeUntil(self.rx.deallocating).bind(to: observer)
51+
_ = viewController.rxDismissed.asObservable().take(until: self.rx.deallocating).bind(to: observer)
5252

5353
// When: Dismissing the ViewController
5454
viewController.didMove(toParent: nil)

xcarthage.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ echo 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x8
1616
echo 'EXCLUDED_ARCHS = $(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)__XCODE_$(XCODE_VERSION_MAJOR))' >> $xcconfig
1717

1818
export XCODE_XCCONFIG_FILE="$xcconfig"
19-
carthage build "$@"
19+
carthage update "$@"

0 commit comments

Comments
 (0)