This post was originally published at Tutorial: Icons, Top Shelf and launch images for tvOS

In this tutorial, we’ll outline how to include various icons, launch images and Top Shelf images for tvOS (guide) without needing to tinker with Corona Enterprise and/or Xcode. In particular, tvOS icons are now multi-layer .lsr files, and tvOS will shift each of these layers around to create a parallax effect. In addition, tvOS now expects a “Top Shelf” image which is displayed when your app is in the first row on the user’s home screen. Fortunately, Corona does most of the work for you by generating the proper files at build time, based on assets that you include and specify.

Additional tvOS build settings

To support tvOS, we are introducing a new block for the build.settings file. Apps built for tvOS should include the new tvos table, while apps built for iOS should continue to use the iphone block that you’re familiar with.

The app icons

You need to provide two icons: large and small. The small icons are 400×240 while the large ones are 1280×768. File names do not really matter, but you must specify them within the respective “small” or “large” table located within the “icon” table (see below). In addition, as noted above, tvOS icons are “layered,” so you should list them in the proper top-to-bottom order within each table:

Note a few other important points regarding app icons for tvOS:

  • The “base” (bottom) layer of icons can not have any transparent regions/pixels.
  • The other layers should have transparent regions to be truly useful.
  • Your image can be as complex as you like in regards to the number of layers. The example above uses three layers: top, middle, and bottom.

Top Shelf and launch images

In addition to the icons, tvOS requires a “Top Shelf” image. This image will appear at the top of the tvOS home screen when the app is selected and located in the top row of five apps. Unlike the multi-layer icons, this is a static image of 1280×720 pixels and it can not have any transparent regions/pixels — even if your image is solid and the .png file has an alpha channel, Apple will reject the app.

You can also include a launch image which will appear briefly as your app loads. This image must be a .png file of 1920×1080 in size and it should not have any transparent regions/pixels. Also note that Apple is extremely particular about the composition of this file as outlined in their guidelines.

Similar to the app icons, both of these files should be specified within the tvos table, but outside of the icons table. Corona SDK will compile and bundle these images as part of build process for tvOS.

Game controllers

Because we want to support more than just the Apple TV Remote, we use the game controller framework. This requires you to include the controllers that you want to support: the Apple TV Remote ("MicroGamepad"), the smaller game pad ("Gamepad"), and the full controller ("AdvancedGamepad"). For Corona Enterprise builds, select these in the “Game Controllers” block on the “Capabilities” tab of the project and Enterprise will include the proper plist settings for you. For Corona SDK builds, simply include the plist block within the tvos table as follows:

App orientation

Corona SDK will ignore orientation settings for tvOS — only "landscapeRight" is supported and it’s done by default. In other words, tvOS apps are always in landscape orientation and you cannot change it.

Conclusion

Providing support for the icons, Top Shelf, and launch images was the latest hurdle to clear toward Corona supporting tvOS. To get started, please refer to the Apple TV and tvOS guide, and stay tuned for further updates as we work to bring support toward the beta stage and beyond!


Continued here – 

This post was originally published at Tutorial: Icons, Top Shelf and launch images for tvOS