How do you fix Xcode 14 warning: "NavigationLink presenting a value must appear inside a NavigationContent-based NavigationView. Link will be disabled."

Hello! Since installing Xcode 14, I am now getting the following error message printed in my console:

NavigationLink presenting a value must appear inside a NavigationContent-based NavigationView. Link will be disabled.

My app is structured as follows:

  1. I have View A wrapped in a NavigationView. The Navigation View has a navigation link inside it that links to View B.

  2. I have View B that doesn't have a Navigation View, but has a navigation link to View C. View B inherits the navigation view defined in View A

The warning is printed when I press the back button on View B, popping back to View A.

The warning goes away when I wrap View B in a NavigationView, but this of course now displays View B in two Navigation Views, which is not what I want.

I'm unsure why this warning is printing, because View B inherits the NavigationView defined in View A.

I see this message too when go back in NavigationView stack. Everything seems fine, maybe a Xcode / iOS 16 bug since they deprecated NavigationView. I see other people complaining about that using early Xcode betas.

I think we should ignore that message and wait for Xcode 14.1.

Is there a solution for that? I'm having the same problem in xcode 14.1. You can't just ignore the message, the link is disabled so the new screen in not showed at all

Did we find answer for this issue. As it says link is disabled, the navigation is not working.

I'm experiencing the same and filed a Feedback report. It's a very annoying warning that floods the console.

How do you fix Xcode 14 warning: "NavigationLink presenting a value must appear inside a NavigationContent-based NavigationView. Link will be disabled."
 
 
Q