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 trialAlex Yakir
5,425 PointsHey Guys, Do I need to unwrap forecastURL? coz it looks like I do. Even In your project files I get the same error.
Error: " did you mean to use"!" or "?" "
Denis Hancock
3,796 PointsSame error here. Value of optional type 'NSURL?' not unwrapped
Jared Watkins
10,756 Pointssame here. Yocoyani answer worked.
3 Answers
Yocoyani Hernandez
1,817 PointsI got the same error and I just unwrapped the forecastURL
let downloadTask: NSURLSessionDownloadTask = sharedSession.downloadTaskWithURL(forecastURL!, completionHandler: { (location: NSURL!, response: NSURLResponse!, error: NSError!) -> Void in println(response) })
Alex Yakir
5,425 PointsThanks Man! Got it :)
mattlebl
10,849 PointsSomewhat trivial, but if you click "Best Answer" under Yocoyani's comment, it will mark it in green text and give them some Treehouse points. :)
Christopher Mayfield
19,928 PointsHey Yocoyani Hernandez do you know why we need to unwrap it?
Chris Rosenberg
1,864 PointsChris Rosenberg
1,864 PointsI'm getting the exact same error!!