SwiftUI macOS simple NavigationStack and NavigationLink -> problem on multiplatform project

I had a problem with my app (or in my setup) and searching the web I found a very simple code where part of my problem occurs.

I create a new Multiplatform App and paste this code in ContentView.

import SwiftUI
struct ContentView: View {
var body: some View {
NavigationStack {
VStack {
Text("Navigation article")
.font(.title)
.padding()
NavigationLink("Go to the second view", destination: SecondView())
.padding()
}
.navigationTitle("First View")
}
}
}
struct SecondView: View {
var body: some View {
Text("This is the Second view")
.font(.headline)
.padding()
.navigationTitle("Second View")
}
}

run on iPhone/ iOS no problem

run on a Mac/macOS Going from view 1 to view 2 work, the back arrow on view 2 is there, and it is working but the second time I go to the view 2, the back arrow is gone.

after looking closely I can see the Arrow Underneath the S of SecondView.

I have tried many things and could not make it work. I post this in a HackingWithSwift forum and somebody tried the code and said it work. so it seems the problem could be related to my setup but I create another user in my computer , same problem and tried it on my another computer, same problem.

What platform versions are you running this on? What version of iOS? What version of macOS? What version of Xcode?

And, how wide is the window that you took the Second View screenshot of? Does the back arrow (or the title) appear in the right location if the window is wider? What happens if you resize the macOS window while it's running? Do the arrow and title draw correctly?

here are the first and second try

First time

Second time

I forgot to mention that after my post on the other website, I suspected my setup , so I delete Xcode using this, before reinstalling everything.

works for me too. Xcode 16.2 (16C5032a) or Xcode 16.3 (16E140), macOS Sequoia 15.3.2 (24D81).

Is your system preferred language English? I tried changing mine to German for a bit, but did not restart the Mac. It still worked as expected.

When you tried it on another Mac, did you copy the app, or build it on the other Mac?

ok, so third person saying it work form them. Clearly the problem is with my setup. I just tried on my Mac mini M2, even if I had tried it before, create the project, copy and paste the code, same problem.

My Mac mini system is Canadian English , but My MacBook was in French Canadian for the first time, because apple Intelligence need the system to be the same language than Siri. but I return to English because I dont recognize so many thing in French.

I dont know what to try next, other than do a full erase and a clean install.

oh, I a miss to post this but I am running macOS Sequoia 15.4 (24E248)

I just create a virtual machine, install 15.4 and Xcode (from developer website, not AppStore, and nothing else , same problem , so it could be related to 15.4 I see ssmith_c you are running 15.3.2.

thank you all for your help, I will keep you posted on new find

i just tried on macOS 15.1 and Xcode 16.1 and no bug so the problem seems to be with macOS 15.4

SwiftUI macOS simple NavigationStack and NavigationLink -> problem on multiplatform project
 
 
Q