Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialNathan Radmall
1,546 PointsI'm getting an error towards the end of this code.
if let plistPath = NSBundle.mainBundle().pathForResource("CurrentWeather", ofType: "plist"), let weatherDictionary = NSDictionary(contentsOfFile: plistPath), let currentWeatherDictionary = weatherDictionary["currently"] as? [String: AnyObject]{ let currentWeather = CurrentWeather(weatherDictionary: currentWeatherDictionary) }
The last line is giving me the error: "Use of unresolved identifier 'CurrentWeather'"
What is this "CurrentWeather" reference referring to?
marsimeyers
11,864 PointsI had the same unresolved identifier issue, and it was because my CurrentWeather struct in CurrentWeather.swift was written with a lower case "c" (as in "currentWeather"). Once I fixed that, it worked. Make sure that the struct name in CurrentWeather.swift matches the exact same format it takes in ViewController.swift.
1 Answer
Girri M Palaniyapan
7,829 PointsSame I am getting an error too. I am also getting an error about the override in the following function.
dexter foo
8,233 Pointsdexter foo
8,233 Pointsthis CurrentWeather is referring to the struct CurrentWeather that you should have created earlier on. If you did not, that might explain why there is an unresolved identifier.