Question

I am looking to find the developer's guide for the iPhone to interact with Apple TV. I am not talking about developing apps for Apple TV. I am talking about interacting with the Apple TV through an iPhone application. Can anyone point me in the right direction?

Was it helpful?

Solution

I've asked this question before, and written an iOS app that fully supports an external screen and I've found there's very little you can actually do besides put stuff in a separate UIWindow.

An Apple TV presents itself to your iOS device as an AirPlay device and you can use it as an external screen and also send and receive remote control events if it's playing media from your device with some of the built in movie controllers.

If you connect to an AppleTV your app will receive a UIScreenDidConnectNotification and you can then choose to place a UIWindow in the second UIScreen instance made available to you.

Two places to look are:

Edit (changed the order)

  1. Apple's View Programming Guide probably has the most useful information on external screens and windows. I've linked to the section on windows that mentions external screens explicitly.

  2. UIScreen documentation

  3. Event Handling Documentation is less useful, as it only really applies if you're playing media from the Music App etc.

Hope that helps!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top