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 Dark Sky API Client Finishing Up The Networking Stack

DarkSkyAPIClient-let task = downloader.jsonTask- Why do i get the value of type JSONDownloader has no member jsonTask?

let task = downloader.jsonTask(with: request) { json, error in DispatchQueue.main.async { guard let json = json else { completion(nil, error) return }

1 Answer

Bruce Röttgers
Bruce Röttgers
18,211 Points

Please format the code right using three backticks + swift + new line and at the end again three backticks (refer to the md cheatsheet for more information.

As to the question make sure you written the function signature as it is (included everything) didn't misspell the function or its arguments).

If you've assured it's spelled right, try just to run it, sometimes the error goes away by itself.

If this doesn't work please provide more information (complete class) for debugging.