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 trial

HTML

How to make an app like currency.io

How do you make an mobile application like [currency.io](//currency.io)? I would really like to know!

5 Answers

Hi Enrique. There are quite a few aspects of currency.io, but I assume you're talking about the fact that you can add it to your home screen and use it offline. Making an app look great on the home screen is as simple as this base bit of markup in your header:

<link rel="apple-touch-icon" href="/your-custom-icon.png"/>

But, that said, you'll probably want different sizes of home screen icons to accomodate different mobile devices. You can do that with the sizes attribute:

<link rel="apple-touch-icon" sizes="57x57" href="/your-custom-icon.png"/>

If you look at the markup for Treehouse you'll see that we have icons in the following sizes: 57x57, 72x72, 114x114, and 142x142. Your icons don't need rounded corners - the device will do that automatically.

The other aspect of currency.io that makes it great for mobile is offline support using the application cache. That's a big topic to dive into, but you can get some great info about it at http://www.html5rocks.com/en/tutorials/appcache/beginner/.

How does it act like a real native app? It can be seen in the recent apps (double click home).

The cache manifest causes it to be treated like its own app in iOS. You can see how they do it in the source on github: https://github.com/benschwarz/currency.io.

Ah, thanks. I downloaded the video on peepcode but does it have anything to do with ruby because that's what he uses, thanks in advanced.

It's just an html thing. You'll want to have an app cache manifest defined and in your page, and a set of icons too, so it looks great on the home screen, but that should take care of it. The Ruby is just there because it's running the logic that they've got in their app.