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 trial

iOS

Stormy App error in NSDictionary - pls help

I am getting an error, reported and unanswered elsewhere;- let currentWeather = weatherDictionary("currently") as NSDictionary

the error here is '(StringLiteralConvertible) -> $T2 is not identical to 'NSDictionary' Any ideas please? I am stuck...

I might not be able to answer the question but can you post your code?

I have posted this is Apple Dev forum, as I think I have discovered a bug. I looked at another solution on GitHub, and their build works, although the line of code is the same. I tested this and used their build but copy/pasted my line to replace theirs (ie only 1 line).

I got the error. The lines were the same.

See here;- https://devforums.apple.com/message/1117704#1117704

Shouldn't brackets be used when accessing dictionary indexes:

let currentWeather = weatherDictionary["currently"] as NSDictionary