Closed vadymmarkov closed 1 year ago
Can also reproduce it using the main
branch of the package, so it's not prerelease only issue.
This also seems to be happening on iOS when targeting to SDK 16.0
Thanks for the report! I've been able to bisect and find that the problem was introduced in this commit: https://github.com/pointfreeco/swift-composable-architecture/commit/fa6e44a8c472c6de08773a617221c00709163341
Will look into fixing soon!
@Jeankio Do you have an iOS 16 repro? I'm able to repro on macOS but not iOS.
Description
I've recently updated TCA from a04be28aff42678566b76eb502ae4644bc4b36c2 to the latest commit b2815caa1727d72180836b85578272b763cc4853 from prerelease/1.0 branch and discovered that tree-based navigation stopped working as expected on macOS.
Update: Can also be reproduced using the
main
branch of the package.For example, suppose we have the "featureA" screen wrapped in
NavigationStack
, and "featureB" is presented in a drill-down from "featureA" usingnavigationDestination(store:state: action:destination:)
. When going back from "featureB" to "featureA" using the default "back" button the.dismiss
action is not being sent to set the child state back tonil
.Strangely, this happens on macOS only, but works as expected on iOS. I don't know if it's a SwiftUI bug, but I didn't experience this behaviour with TCA from a04be28aff42678566b76eb502ae4644bc4b36c2.
Checklist
main
branch of this package.Expected behavior
The
PresentationAction/dismiss
action should be sent tonil
out the child state when going back to the parent feature using the navigation bar "back" button.Actual behavior
The
PresentationAction/dismiss
action is not being sent tonil
out the child state when going back to the parent feature using the navigation bar "back" button.Steps to reproduce
You can reproduce the incorrect behaviour in the attached project. Changing package commit to a04be28aff42678566b76eb502ae4644bc4b36c2 fixes the issue.
NavigationTestCase.zip
The Composable Architecture version information
b2815caa1727d72180836b85578272b763cc4853
Destination operating system
macOS 13
Xcode version information
14.3.1
Swift Compiler version information