Apple's Swift UI Tutorial: I'm Stumped

I finished Codecademy’s course for Swift yesterday and it was fantastic. I’ve now been working through Apple’s Swift UI Tutorial over the past few hours and have made good progress, but now I’m stumped.

I’m attempting to implement the “favorites” user input field within LandmarkRow.swift and continue getting the error message “value of type ‘Landmark’ has no member ‘isFavorite’”.

“isFavorite” is listed as a variable within the Landmark structure in Landmark.swift and is also included in the referenced landmarkData.json file. Any idea where I’m going wrong?

I can only include one media item per post, so here’s another screenshot that shows the LandmarkRow.swift file.

I know it sounds silly, but have you made sure all your files are saved and tried hitting Try Again?

From what I can see, your code looks the same as in the tutorial. I’d double check that everything is saved, just to be safe. I also saw online that some people mentioned cleaning the build folder before trying to re-build. That seems to have helped resolve some similar issues.

1 Like

as @el_cocodrilo said, maybe try saving the files and running your app or closing & reopening your project/app?