I have this TabView based SwiftUI app and each tab has its own navigation stack which works as expected and there are no issues because all my 4 tabs have 4 separate independent navigation stacks. However, in many cases, on those navigations, I want to provide the navigation on top of tab bar so that it looks like a real push happening on top of main tab bar. If I add NavigationStack on top of tab view then app crashes. For now I am using .toolbar(.hidden, for: .tabBar) API but that looks like a hack because it does not have same effect as it would be if there is push on top of tab bar. So how can I have one global app level navigation stack that is parent of whole app and also local navigation stacks one for each tab item. And if I use global navigation stack it should push on top of tab bar and if I use local navigation stack then it should push within that tab only.
I have seen Facebook messenger apps "People" tab and "Settings" tab are showing this working but I dont know how did they do that.