I am trying to make a currency converter in Swift. I saw this post: Need API for currency converting and How to make an HTTP request in Swift?.
So when I combined them together:
let url = NSURL(string: "http://download.finance.yahoo.com/d/quotes.csv?s=USDEUR=X&f=nl1d1t1");
let task = NSURLSession.sharedSession().dataTaskWithURL(url!) {(data, response, error) in
println(NSString(data: data, encoding: NSUTF8StringEncoding))
}
task.resume()
It returns me a output as such:
Optional("USD to EUR",0.7987,"11/20/2014","3:45am")
But I want to access the currency exchange rate. How do I do that? I am not sure how to do that?