Vision OS Navigation Links stop highlighting and not selectable

It seems to stop working after I navigate to a View that has a UIRepresentable holding a MapKit map. This was while I was testing in AVP device but I couldn't duplicate it in the simulator.

The top view has the NavigationStack. The top view is a lazygrid that has a custom "GridItem" view I made which either sets the string value of a NavigationLink or in some cases I use a button to open a url in Safari.

NavigationLink(value: button.name) {
//a menu with an Image() and Text()
}
// or some menus open to Safari
if button.name == "Parking Site" {
//a button with an action the opens to Safari
}

For a NavigationLink string value, the navigationDestination takes them to the view based on the selected value. For example, it loads DirectoryView() for "Directory"

.navigationDestination(for: String.self) { textValue in
       if textValue == "Directory" {
           DirectoryView()
...

It all works at the start, but after visiting a UIRepresentable and returning back to the parent menu view - all the NavigationLinks lose the highlight and can no longer be selected.

I'll try to scale it down to a more simple structure and also test the same code on an iOS project to see if it's a bug for AVP.

I'll try to scale it down to a more simple structure and also test the same code on an iOS project to see if it's a bug for AVP.

Please post your FB# here after you file the bug so the broader team can take a look.

Also, you might switch to the SwiftUI implementation of Map if that's a viable option for your app.

Vision OS Navigation Links stop highlighting and not selectable
 
 
Q