Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Landmarks SwiftUI Tutorial - Creating watchOS App - Navigation Broken

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

like image 381
Krall Avatar asked Nov 16 '25 12:11

Krall


1 Answers

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.

like image 139
user3630663 Avatar answered Nov 18 '25 20:11

user3630663



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!