Using what you have learnt in previous modules to display the latest price of 1 Bitcoin (BTC) in US dollars (USD).
You'll need the coinapi.io API for the Exchange Rate to achieve this:
https://docs.coinapi.io/#get-specific-rate
It might be worth having a read of the API documentation before proceeding.
The value we're interested from the API is the rate
of Bitcoin in USD.
Using the browser (e.g.Chrome) figure out how to create the final url string based on the currency that was selected by the user.
Take a look at how we used the URLSession object to make a network request to openweathermap’s servers. See if you can adapt it for our Bitcoin app to be able to print the data that we get back from the networking request.
GOAL
HINT: Don’t worry about the delegate method or parsing the json, we’ll do that in the next steps.
HINT 2: To turn a Swift Data object into a String, you can use a String initialiser that takes a Data object as an input:
https://stackoverflow.com/questions/39616821/swift-3-0-data-to-string
SOLUTION
Check out the solution to this challenge step by cloning the project from the link below:
https://github.com/appbrewery/ByteCoin-iOS13-Completed/tree/Step-3-Solution