Post

Replies

Boosts

Views

Activity

Reply to iOS 18 beta bug: NavigationStack pushes the same view twice
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?
Sep ’24