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 trialirem gürel
5,732 PointsI do exactly the same but compiler says
I have written exactly the same but compiler says Use of unresolved identifier with and Use of unresolved identifier completionHandler
Here is the scope:
func FSONTask(with request: URLRequest) -> URLSessionDataTask { let task = session.dataTask(with request: URLRequest, completionHandler completion: @escaping(JSON?, DarkSkyError?)-> Void) -> URLSessionDataTask{ let task = session.dataTask(with: request) { data, response, error in guard let httpResponse = response as? HTTPURLResponse else{ completion(nil, DarkSkyError.responseFailed) return }
Jeff Ripke
41,989 PointsJeff Ripke
41,989 PointsCan you provide us the the rest of the code? Also if you three ` (below the esc key), include the language type after the first three ticks, before and after the code it will be easier for us to read.