Apple's SwiftUI Tutorial: I'm Stumped

233 Views Asked by At

I've been working through Apple's SwiftUI 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?

Here is the link to the specific section I'm referring to on Apple's tutorial: https://developer.apple.com/tutorials/swiftui/handling-user-input#Mark-the-Users-Favorite-Landmarks

Screenshot: Landmark.swift
Screenshot: LandmarkRow.swift
Screenshot: Diagnostics

1

There are 1 best solutions below

2
On

Cleaning the build folder did the trick! As a rookie I wasn't aware of that feature.

For those who may come here from Google in the future, try: Menu Bar > Product > Clean Build Folder

Thanks for the help.