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 Build a Weather App with Swift Managing Complexity Grand Central Dispatch

Brandon Hawks
Brandon Hawks
6,197 Points

If anyone is having problems with the 'nil' error, this FIXED my problem.

In Swift 2 & Xcode 7.0.1 Beta, If you have returned "Cannot assign a value of type 'NilLiteralConvertible' to a value of type 'Int' this should fix the error.

In the currentWeather.swift, make sure to add ? to 'Int' in struct CurrentWeather to make them :

struct CurrentWeather { let temperature: Int? let humidity: Int? let precipProbablilty: Int? let summary: String

Hope this helps anyone with the newest and best versions of Swift and Xcode!