Including App Resources

So far, we’ve just been shipping code with our apps, but most projects require a variety of resources: images, sounds, or just raw data. RubyMotion has pretty seamless methods for including each of these, so let’s take look.

Bundling Icons

Dribbble-worthy or not, your app’s icon will appear in many different locations and on varying resolutions: iPhones, iPads, iTunes, and maybe more in the future. To preserve the icon’s visual integrity, Apple encourages developers to ship multiple versions of the icon with every app.

To include your icon files, simply add them to the resources folder. They can have any name, but being descriptive is never a bad idea (such as Icon-72 and Icon-144). Finally, set the icons array of ...

Get RubyMotion now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.