The first Swedish Hackathon on the new Apple TV!

Fredrik Gunnarsson
Nov 9, 2015 · 5 min read
Visit our meetup for more images!

We are proud to say that we (probably) held the first Swedish tvOS (Apple TV) Hackathon ever! The setup for this Hackathon was to put full focus on the technical parts of the new Apple TV. So we invited all iOS-developers out there to come and try out the new hardware, brainstorm, be inspired and build prototypes on tvOS with us. Some great teams from different kinds of companies joined us in this event.

Prior to this hack, we also spent some time internally to work out a bunch of really cool concepts, ideas and technical challenges. Moreover, we took some time to do an internal tvOS mini-hackathon as well, just to figure out some key technical findings which then could serve this open hackathon with some great input to start with, to minimise technical blockers and save some time.

Finally, a big thanks to all of you that took part in this event Your engagement and focus really made the hackathon a real success and a great experience to us all!

Intrigued? Watch a longer version here.

Key technical findings

Now, we firmly believe in sharing what we learnt. So here are some of the findings from our first app hackathon. Enjoy!

Visit our meetup for more images!

Connectivity

Can Apple-TV search for Bluetooth tags?

It seems to be 100% as on iOS, the Core Bluetooth works straight off. But you have never been able to search for Bluetooth MAC addresses. For instance, One could search for searchable bluetooth services.

How can I use my iPhone as a remote controller for my tvOS app?

Unfortunately Mulit-Peer connectivtiy is not suppored on tvOS…

But! With a device on the same WiFi as the AppleTV it is possible to use socket communication between the app on the AppleTV and an app on a device. Bonjour can be used for service registration and look up. You could also install a socket client such as StarScream on your tvOS app and let it connect to a Node.js server, and send your iOS app control events to that server acting as a relay.

Push Notifications

Do they exist at all on Apple Tv?

Partially, remote notifications works except that flags for badge and sound doesn’t seem to trigger anything (iOS 9.1 beta). Moreover, no notifications view are shown (doesn’t pop-up). It behaves like a silent push where the app can read data from the body.

Does any form of local notifications exists if the app is in background?

No, local notifications are not supported.

Web Content

Webview does not exists. What alternatives exists to show web content anyway?

It’s possible to load images/screenshots of web pages and to show them in a scrollview.

Media Streaming

How to embed a video stream in the app?

It’s the very same as in iOS; AVPlayer + AVPlayerViewController.

What formats are supported? Can the player UI be customised, for instance, change the buttons?

All formats are supported since its the AVPlayer.

For custom interface, you need to build your own ViewController for the AVPlayer, this since the AVPlayerViewControllerView always has focus when in full-screen mode.

Is it possible to sync a stream that several clients views at the very same time, for instance via Firebase?

Again, since its the AVPlayer, the playback can be synchronised via Firebase. Here, its the message-service that puts the boundaries, not the apple TV. But Firebase has not yet released their SDK for tvOS, we got hold of an beta version from Firebase.

Audio/Video

How can you get sound/video-streams from a device to the app on tvOS?

You could use raw-sockets, a server on tvOS app and a client on the iOS app, that transfers the data you want to send from your iPhone to the AppleTV app. This could be achived on the local network using Bonjour services. Or you could have a raw socket client on the tvOS app as well and run the communication of data via a sever.

Can one get the audio from the remote mic (iOS device) to ones app on tvOS?

Use AVAudioRecorder on iOS and send the data to your tvOS app via a valid medium, see answer 8 above.

Remote Controller

Have we somehow confirmed what will apply regarding Siri here for us in Sweden? Will Siri be disabled completely, or can the user utilise Siri, but then in English?

Siri is limited to the following countries: Australia, France, Japan, Canada, Spain, Britain, Germany and the United States. Users in Sweden and other parts of the world will need to settle for the usual search function, at least initially.

Is it possible to build an Android app to use an Android mobile phone as a remote for a tvOS app?

It is fine to control the menu with an android device via infrared. Whether the motion sensors in android can be used over bluetooth is something that we will answer in the upcoming days here at this blog.

Is it possible to get hold of the audio from the new Apple TV remote?

No.

General

Can you code in objective-c or just Swift?

You can code in both.

Third Party Libraries?

Third party libraries (cocoapods etc.) won’t work out of the box and needs to be updated to support the TVOS platform.

And the winners are…

Visit our meetup for more images!

Even though all the teams made a really great job, all participants voted for a winning team and a runner up team which won nice prizes (a brand new Apple TV as the first prize).

Want to know more?

If you are interested in upcoming Apegroup hackathons you are more than welcome to join our meetup group!

You can watch all the images from the evening right here!

More To Come! In a couple of days we’ll present more technical findings from this event on this blog. So, stay tuned!

Meanwhile you can follow us on twitter, facebook and linkedin. Be sure to check out our website as well!

Peace out!

Apegroup — Behind the Screens

Thoughts, learnings and opinions from a digital product studio in Sweden who deliver world-class design, technology and communication.

Fredrik Gunnarsson

Written by

Apegroup — Behind the Screens

Thoughts, learnings and opinions from a digital product studio in Sweden who deliver world-class design, technology and communication.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade