diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c7e1ff..b804b28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +** Version 2.12.4 **: + +- fix reentrancy issue with forwardToCurrentFlow + ** Version 2.12.3 **: - fix "Unhandled files" warnings in the Package.swift file diff --git a/RxFlow.podspec b/RxFlow.podspec index d4d049c..c8720a2 100644 --- a/RxFlow.podspec +++ b/RxFlow.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "RxFlow" - s.version = "2.12.3" + s.version = "2.12.4" s.swift_version = '5.4' s.summary = "RxFlow is a navigation framework for iOS applications, based on a Reactive Coordinator pattern." diff --git a/RxFlow.xcodeproj/project.pbxproj b/RxFlow.xcodeproj/project.pbxproj index 6dee9df..7d02184 100644 --- a/RxFlow.xcodeproj/project.pbxproj +++ b/RxFlow.xcodeproj/project.pbxproj @@ -604,7 +604,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 2.12.3; + MARKETING_VERSION = 2.12.4; PRODUCT_BUNDLE_IDENTIFIER = io.warpfactor.RxFlow; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -639,7 +639,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 2.12.3; + MARKETING_VERSION = 2.12.4; PRODUCT_BUNDLE_IDENTIFIER = io.warpfactor.RxFlow; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/RxFlow/FlowCoordinator.swift b/RxFlow/FlowCoordinator.swift index a80e3e8..1cd4632 100644 --- a/RxFlow/FlowCoordinator.swift +++ b/RxFlow/FlowCoordinator.swift @@ -128,7 +128,9 @@ public final class FlowCoordinator: NSObject { private func performSideEffects(with flowContributor: FlowContributor) { switch flowContributor { case let .forwardToCurrentFlow(step): - self.stepsRelay.accept(step) + DispatchQueue.main.async { [weak self] in + self?.stepsRelay.accept(step) + } case let .forwardToParentFlow(step): parentFlowCoordinator?.stepsRelay.accept(step) case .contribute: diff --git a/RxFlowTests/FlowCoordinatorTests.swift b/RxFlowTests/FlowCoordinatorTests.swift index 47470a6..ebd3f96 100644 --- a/RxFlowTests/FlowCoordinatorTests.swift +++ b/RxFlowTests/FlowCoordinatorTests.swift @@ -268,7 +268,7 @@ final class FlowCoordinatorTests: XCTestCase { // Then: Steps from .multiple FlowContributors are triggered.toArray() let actualSteps = try? testFlow.recordedSteps.take(3).toBlocking().toArray() - XCTAssertEqual(actualSteps, [.multiple, .one, .two]) + XCTAssertEqual(actualSteps, [.multiple, .two, .one]) } func testStepHasBeenFilteredBeforeNavigateForAFlowStepper() {