In my case, a successful workaround has been moving my convenience modifier around navigationDestination to be used directly within the NavigationStack.
Broken example:
NavigationStack(path: $navModel.myFarmTabPath) {
MyRootScreen()
.appNavigationDestinations() // <- My wrapper around destination selection
}
Working example:
NavigationStack(path: $navModel.myFarmTabPath) {
MyRootScreen()
.navigationDestination(for: Screen.self) { screen in
return screen.representedDestination
}
}
To keep things tidy and allow for easier re-use in my tab views, I've added an extension to Screen which returns a destination:
extension Screen {
@ViewBuilder
var representedDestination: some View {
switch self {
case .screenOne:
ScreenOne()
case .screenTwo:
ScreenTwo()
}
}
Post
Replies
Boosts
Views
Activity
I have the same issue on iOS beta 7.
Our affected app can't use the workaround, since we need to be able to inspect the navigation path items.
I have filed a radar: FB14936419