Replies: 2 comments
-
Is this possibly caused by the infamous "can't navigate deeper than 2 levels" bug in SwiftUI's |
Beta Was this translation helpful? Give feedback.
-
Hi @wilsonmhpn, this is unfortunately just a bug with SwiftUI. The same would happen in vanilla SwiftUI without TCA. If you are linked deep enough into an app (such as drill-down > sheet), then trying to all-at-once reset it to a different navigation configuration just fails. The fix is to help out SwiftUI by creating multiple steps to restore the navigation. You could first clear out navigation to bring it back to the root, pause a brief moment, and then you can add the new drill-down+sheet. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In an app with navigation structured as follows...
...navigating to Leaf A, then handling a deep link intended to navigate to Leaf B, results in logs that indicate something "received a child action when child state was set to a different case"
The code that handles the deep link is as follows:
There is a full app demonstrating this at [link to TCAQuestion0001 removed, outdated] (make sure you're on the TCAQuestion0001 branch for this, which should be the default). To see the issue in the app, click the "Show Intermediate A" button, then the "Show Leaf" button, which will take you to Leaf Scene A. Then background the app, and (one way or another, perhaps by making an appointment in the simulator's calendar with the URL) follow a deep link to tca20221220://nothing .
How can this
child state was set to a different case
error be prevented? Is it possible to set a two-level route like this, directly on receiving a deep link? The commented out "simpler case" of setting a one-level route works without complaint.Beta Was this translation helpful? Give feedback.
All reactions