Miraj: an app for the new apple tv


#1

Miraj

We just released a (free) tvos app at Sosolimited using Cinder.

From the sosolimited page:

Miraj is an interactive artwork that you paint with your voice. Say anything into the Apple TV remote, and within seconds Miraj brings it to life. A perpetually changing collage of mesmerizing image and color takes over your TV screen.

Credits

Direction: Eric Gunther
Design: Jackie Littman
Additional Design: Emily O’Brien
Server, UI programming: Colin Wageman
Graphics programming, technical direction: David Wicks

Technical Details

To build the app, we needed to compile Cinder for tvos. This mostly entailed setting a handful of compiler flags and disabling features that don’t exist on the tv (but do on ios). You can find that work in Sosolimited’s cinder for tvos branch. It should work out of the box, with a sample project in test/tvosAppTest.

We built out the user interface with Swift and UIKit. To interoperate with our Cinder code, we took advantage of the excellent language interface between Swift and Objective-C. We have a single Objective-C class used as a namespace to contain static methods that query or manipulate the Cinder application instance. All the graphics and image manipulation happen in Cinder. All the user interaction happens in a Swift viewcontroller hierarchy.

If you want to release your own tvos apps in the app store, you will need to build a Cinder archive in order to properly enable bitcode. You can then extract the libcinder.a library from that archive to link against. For some reason, XCode doesn’t respect the bitcode enabling flag when building static libraries and doesn’t (yet) provide an alternative setting to enable bitcode on tvos like it does for ios. Building Cinder from the command line works fine for test builds installed via XCode.

Have Fun!

If you have a new apple tv, give Miraj a spin. Then try building your own tvos app using Cinder.


#2

Very Awesome! I’m actually excited to look more into this after what you were saying about the Swift->Obj-C interop at eyeo.