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,209 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.