I stumbled onto a workaround which might be usefull for someone else. I also have the observable Router class with a published NavigationPath, passed along as environment object as described here. I agree that it looks like a bug in iOS 18, the same code works in iOS 17 and also by just removing the tab view. The workaround is to pass the path as a manually created binding:
NavigationStack(path: Binding(get: { navigationPath }, set: { navigationPath = $0 })) {
...
}
Maybe this stops SwiftUI from applying some optimization which is buggy?
Post
Replies
Boosts
Views
Activity
Thanks for the quick reply. I have created a feedback with the same info as here and a sampe project and sysdiagnose: FB15507457
I didn't know where to file it so I picked Xcode. I can't reset the phone right now but will do it sa soon as I can and follow up.