From 226f39b7c948ac0a3dd47335679b0d40c447aaaf Mon Sep 17 00:00:00 2001 From: Takuji Terada Date: Fri, 1 Oct 2021 13:48:31 +0900 Subject: [PATCH 1/2] update Example --- Example/Podfile.lock | 40 +++++++++---------- Example/RxController/AppDelegate.swift | 5 ++- .../Controller/Child/NameViewModel.swift | 5 ++- 3 files changed, 27 insertions(+), 23 deletions(-) diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 3bb5dd3..cca72b3 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,17 +1,17 @@ PODS: - Differentiator (5.0.0) - - Fakery (5.0.0) - - Reusable (4.1.1): - - Reusable/Storyboard (= 4.1.1) - - Reusable/View (= 4.1.1) - - Reusable/Storyboard (4.1.1) - - Reusable/View (4.1.1) + - Fakery (5.1.0) + - Reusable (4.1.2): + - Reusable/Storyboard (= 4.1.2) + - Reusable/View (= 4.1.2) + - Reusable/Storyboard (4.1.2) + - Reusable/View (4.1.2) - RxBinding (0.5): - RxCocoa (~> 6) - RxSwift (~> 6) - - RxCocoa (6.0.0): - - RxRelay (= 6.0.0) - - RxSwift (= 6.0.0) + - RxCocoa (6.2.0): + - RxRelay (= 6.2.0) + - RxSwift (= 6.2.0) - RxController (1.0.0): - RxCocoa (~> 6) - RxFlow (~> 2.12.0) @@ -25,12 +25,12 @@ PODS: - RxCocoa (~> 6) - RxDataSources (~> 5) - RxSwift (~> 6) - - RxFlow (2.12.0): + - RxFlow (2.12.4): - RxCocoa (>= 6.0.0) - RxSwift (>= 6.0.0) - - RxRelay (6.0.0): - - RxSwift (= 6.0.0) - - RxSwift (6.0.0) + - RxRelay (6.2.0): + - RxSwift (= 6.2.0) + - RxSwift (6.2.0) - SnapKit (5.0.1) DEPENDENCIES: @@ -60,18 +60,18 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Differentiator: e8497ceab83c1b10ca233716d547b9af21b9344d - Fakery: 8146918b8dd6df98564dca10cbe8bd05354b8cc4 - Reusable: 53a9acf5c536f229b31b5865782414b508252ddb + Fakery: a90caff00ca5cacde6c161c3eafc72314a03d34d + Reusable: 6bae6a5e8aa793c9c441db0213c863a64bce9136 RxBinding: e3c76d02d0ee3f1a306a0fb8e8ef6f2eda65a375 - RxCocoa: 3f79328fafa3645b34600f37c31e64c73ae3a80e + RxCocoa: 4baf94bb35f2c0ab31bc0cb9f1900155f646ba42 RxController: 2590220770cc46f7918a399b46468fd06574c06c RxDataSources: aa47cc1ed6c500fa0dfecac5c979b723542d79cf RxDataSourcesSingleSection: e646e523ad92109293b22e745b55dcb38bea7a58 - RxFlow: b407eb6b5d956041a9e0930469346e104911a470 - RxRelay: 8d593be109c06ea850df027351beba614b012ffb - RxSwift: c14e798c59b9f6e9a2df8fd235602e85cc044295 + RxFlow: 03a73c83fb8f183107074b40ab2544c668583f73 + RxRelay: e72dbfd157807478401ef1982e1c61c945c94b2f + RxSwift: d356ab7bee873611322f134c5f9ef379fa183d8f SnapKit: 97b92857e3df3a0c71833cce143274bf6ef8e5eb PODFILE CHECKSUM: ba6283578e076eb1e1d926dfc1c2610458f4d335 -COCOAPODS: 1.10.1 +COCOAPODS: 1.11.2 diff --git a/Example/RxController/AppDelegate.swift b/Example/RxController/AppDelegate.swift index 699d276..4ecca76 100644 --- a/Example/RxController/AppDelegate.swift +++ b/Example/RxController/AppDelegate.swift @@ -16,7 +16,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate { private let coordinator = FlowCoordinator() private let disposeBag = DisposeBag() - private let window = UIWindow() + + lazy var window: UIWindow? = UIWindow() func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { coordinator.rx.didNavigate.subscribe(onNext: { @@ -30,6 +31,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate { } private func coordinate(to: (UIWindow) -> (Flow, Step)) { + guard let window = window else { return } + let (flow, step) = to(window) coordinator.coordinate(flow: flow, with: OneStepper(withSingleStep: step)) window.makeKeyAndVisible() diff --git a/Example/RxController/Controller/Child/NameViewModel.swift b/Example/RxController/Controller/Child/NameViewModel.swift index 95f2e11..38f2cf5 100644 --- a/Example/RxController/Controller/Child/NameViewModel.swift +++ b/Example/RxController/Controller/Child/NameViewModel.swift @@ -22,10 +22,11 @@ class NameViewModel: BaseViewModel { private let faker = Faker(locale: "nb-NO") private let nameRelay = BehaviorRelay(value: nil) - + private let numberRelay = BehaviorRelay(value: nil) override func prepareForParentEvents() { bindParentEvents(to: nameRelay, with: InfoEvent.name) + bindParentEvents(to: numberRelay, with: InfoEvent.number) } var name: Observable { @@ -39,7 +40,7 @@ class NameViewModel: BaseViewModel { } var number: Observable { - return parentEvents.value(of: InfoEvent.number) + numberRelay.asObservable() } func updateName() { From 92d4abc0a2e9fc98b2eaa1b82a4af979c3a8c47e Mon Sep 17 00:00:00 2001 From: Takuji Terada Date: Fri, 1 Oct 2021 13:50:55 +0900 Subject: [PATCH 2/2] Bump version to 1.1.0 --- Example/Podfile.lock | 4 ++-- RxController.podspec | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Example/Podfile.lock b/Example/Podfile.lock index cca72b3..af2488b 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -12,7 +12,7 @@ PODS: - RxCocoa (6.2.0): - RxRelay (= 6.2.0) - RxSwift (= 6.2.0) - - RxController (1.0.0): + - RxController (1.1.0): - RxCocoa (~> 6) - RxFlow (~> 2.12.0) - RxSwift (~> 6) @@ -64,7 +64,7 @@ SPEC CHECKSUMS: Reusable: 6bae6a5e8aa793c9c441db0213c863a64bce9136 RxBinding: e3c76d02d0ee3f1a306a0fb8e8ef6f2eda65a375 RxCocoa: 4baf94bb35f2c0ab31bc0cb9f1900155f646ba42 - RxController: 2590220770cc46f7918a399b46468fd06574c06c + RxController: e3b8e30891d56ee1e1751f056f0b3654a00e8a28 RxDataSources: aa47cc1ed6c500fa0dfecac5c979b723542d79cf RxDataSourcesSingleSection: e646e523ad92109293b22e745b55dcb38bea7a58 RxFlow: 03a73c83fb8f183107074b40ab2544c668583f73 diff --git a/RxController.podspec b/RxController.podspec index ccfcda2..6db90aa 100644 --- a/RxController.podspec +++ b/RxController.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = 'RxController' - s.version = '1.0.0' + s.version = '1.1.0' s.summary = 'A library for developing with MVVM-C based on RxFlow and RxSwift.' # This description is used to generate tags and improve search results.