Is there a reason MultipeerConnectivity isn't part of tvOS?

I know that it's possible to use Apple's own remote app on an iPhone to have it act as a basic controller for games (and other apps) on tvOS apps... but what if people want to implement their own, unique controller UIs (and related UIs eg hiding info from other players in the room) on iOS devices and have those control tvOS apps? What's the best way to do this kind of thing for tvOS apps?


My first thought (perhaps wrongly) was to use the MultipeerConnectivity framework, but I noticed that's been removed from tvOS. Is there a reason why MultipeerConnectivity isn't available in tvOS? Is there a preferred way to write custom controller apps on iOS devices for interacting with tvOS apps?


Thanks in advance for any thoughts on this...

Answered by Technology Evangelist in 52243022

You are correct that the Multipeer Connectivity framework is unavailable.


Please file an enhancement request at bugreporter.apple.com if you would like to see this framework brought over to tvOS.


Currently, you have several options for connectivity as discussed in this page, such as using CoreBluetooth, or connecting over the local network using Bonjour discovery.

I also asked myself the same thing. Maybe your controll App and the tvOS App can connect via Bluetooth 4.0 to share data and input. Also a nice-to-have feature would be if Apples Remote App would allow to present custom Controll UIs so not every game on tvOS must have aseperate controll App for iOS to download. So your friends only have to download the Remote App one time and every game could use the App as input.

Yes! It would be amazing if Apple's remote app (or some other Apple app) allowed presentation of custom UIs and associated actions on iOS devices. You could imagine a really nice system to allow tvOS apps to automagically present custom UIs on iOS devices according to the app being run on the Apple TV.

I definitely agree. It would be nice for the user to only download one app and also easier for the developers to only create some UIViews instead of an whole application. Maybe send an feature request to Apple after the dev Kits are out and some of us get theur hands on it.

Good catch psynixis! I didn't realized MultipeerConnectivity was removed. I ussumed this is how we'd use iPhones to talk locally to the AppleTV. Well then, what ways do exist?

Accepted Answer

You are correct that the Multipeer Connectivity framework is unavailable.


Please file an enhancement request at bugreporter.apple.com if you would like to see this framework brought over to tvOS.


Currently, you have several options for connectivity as discussed in this page, such as using CoreBluetooth, or connecting over the local network using Bonjour discovery.

Any other kind of networking, basically. Use NSNetService to advertise availability and discover other peers. The actual messaging can be done by TCP or UDP with a variety of APIs like CFSocketStreamOpenPairToHost or NSInputStream, although I'd recommend a higher level protocol like WebSockets.

I've also filed a radar asking for this. rdar://22717027


A big benefit of Multipeer Connectivity will be to connect to apps on existing devices, without having to rewrite the whole protocol.

Unbelievable. I've just started work on the networking component of my current project with Multipeer. The intent was to take this directly into the tvOS sister app so that students could communicate to the classroom device from their iPads.


The newest (AFAIK) API for easy inter device communications from Apple is not included? Well, there goes a weeks work. Time to start looking at NSNetService or similar. What Multipeer gave us was the ability to easily setup an adhoc local network without the need for an internet connection or router; essential in many classrooms.


Radar time.

This does not make any sense! The MultipeerConnectivity Framework uses well-defined networking protocols like DNS-Based Service Discovery for services discovery (classes MCNearbyServiceBrowser, MCNearbyServiceAdvertiser) and async socket for advconnection part (MCSession) that can run without any problem on tvOS. There is not reason this framework is not available on tvOS 9.0 neither on tvOS 9.1Beta. I have filed a radard, asked the AppleTV and Gaming evangelists, hopefully we will see it on the tvOS9.2, that is not officially on the roadmap for the release!

Filed a report as well on this (#23274174)... although asking for much richer functionality. There is a lot to gain with some very simple but important additions to the SDK.

Is there a reason MultipeerConnectivity isn't part of tvOS?
 
 
Q