I'm just doing SwiftUI tutorial and I'm stuck at https://developer.apple.com/tutorials/swiftui/creating-a-watchos-app (section 4, Add the Landmarks List). Everything worked fine till now, navigation links on the watchOS are not working, just nothing happens. I found on StackOverflow someone with same problem in comments, but there wasn't any reply. (NavigationLink broken on watchOS?) Someone said It's broken since watchOS 8.1. What to do to start the links working? :D
Code:
ForEach(filteredLandmarks) { landmark in
NavigationLink {
LandmarkDetail(landmark: landmark)
} label: {
LandmarkRow(landmark: landmark)
}
}.navigationTitle("Landmarks")
Project files: https://docs-assets.developer.apple.com/published/d46bb54c0c90d4e01351338f4627245e/15600/CreatingAwatchOSApp.zip
I just ran into the same issue in the live preview. Digging around I couldn't find a solution, but when I ran the app in the simulator, the links did work. This was with Xcode 13.4.1.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With