I am blocked by this nasty error while learning iOS sharedSession singleton and async calls
here is my code
let baseUrl = NSURL(string: "https://api.forecast.io/forecast/\(apiKey)/")
let forecast = NSURL(string: "47.856223,-122.272590", relativeToURL: baseUrl)
let sharedSession = NSURLSession.sharedSession()
let downloadTask: NSURLSessionDownloadTask =
sharedSession.downloadTaskWithURL( forecast, completionHandler:
{ (loction: <#NSURL!#>, response: <#NSURLResponse!#>, error: <#NSError!#>) -> Void in
println(response);
})
}
here is where error happens
{ (loction: <#NSURL!#>, response: <#NSURLResponse!#>, error: <#NSError!#>) -> Void in
println(response);
})
here is error
1-expected an identifier to name generic parameter
2- expect parameter type following :