SwiftUI iOS 16 NavigationPath inside TabView Warning: NavigationAuthority

1.3k views Asked by At

I have a TabView and each Tab has it's own NavigationPath which I am handling inside an ObservableObject.

@MainActor final class Router: ObservableObject {
    @Published var homeNavigationPath = NavigationPath()
    @Published var searchNavigationPath = NavigationPath()
    @Published var notificationsNavigationPath = NavigationPath()
    @Published var profileNavigationPath = NavigationPath()
}

I am doing this so each Tab can PopToRoot of it's own accord. Everything seems to be working great, however I get the following message in the Console...

Update NavigationAuthority bound path tried to update multiple times per frame.

Does anyone know what this means? Am I doing something wrong or is it perfectly fine to have multiple NavigationPaths like this?

0

There are 0 answers