navigationBarItems for SwiftUI not working for watchOS

Trying to use navigationBarItems isn't working in watchOS. I get the error 'Value of type 'some View' has no member 'navigationBarItems'.

Code Block
.navigationBarItems(trailing: Button("Help") { print("Help tapped!") })


Developer documentation shows that this should be available watchOS 6.0+. iOS does work. Why isn't Xcode recognizing this for watchOS?

navigationBarItems requires NavigationView which is not available in watchOS


Sorry this is on watchOS 7.0 on Xcode 12 beta which does have NavigationView available so navigationBarItems should be available as well
navigationBarItems is not available on watchOS, and is deprecated on iOS. Please check out toolbar and ToolbarItem. Note the ToolbarItemPlacement values which are available for watchOS.
navigationBarItems for SwiftUI not working for watchOS
 
 
Q