error build: Cannot find 'NavigationStack' in scope

just upgraded Xcode beta to Xcode 14 RC

Now it does not find NavigationStack in scope. It build fine on Xcode beta.

               

                NavigationStack {                     List() { ... } }

Same issue here. Did Apple manage to break the RC once again or are we doing something wrong?

Same here! Unbelievable with RC version.

Strange. I am not having this problem on Xcode 14 RC. Are you sure you have imported SwiftUI?

Just installed Ventura beta 7, now two new additional errors..

error build: Cannot infer contextual base in reference to member 'horizontal'

error build: Value of type 'TextField' has no member 'autocorrectionDisabled'

It happens when you develop for iOS, iPadOS, and MacOS.

Make sure that your macOS minimum deployment target is set to version 13.0, otherwise NavigationStack will not be available. I'm assuming you're iOS target version is 16.0.


Just installed Ventura beta 7, now two new additional errors..

Double-check you are targeting iOS 16 and/or macOS 13 where NavigationStack, and other new APIs, are available.

If not, you will have to provide more information on where these errors are coming from.

This fixed the issue. I had a Mac OS build in the supported destinations

Maybe this will explain things (from the macOS and Xcode release notes):

The macOS 13 SDK provides support to develop apps for Mac computers running macOS 13 Ventura beta 7. The SDK comes bundled with Xcode 14 beta 6 ...

Xcode 14 RC includes Swift 5.7 and SDKs for iOS 16, iPadOS 16, tvOS 16, watchOS 9, and macOS Monterey 12.5. 

I have fixed it using NavigationView {} instead NavigationStack{}

i have MACOS 11.6.2 and my xcode version is 13.2.1 and i am getting this same error "Cannot find 'NavigationStack' in scope" how to fix this , any solution

error build: Cannot find 'NavigationStack' in scope
 
 
Q