Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.