Developer Guide for Apple TV - ios

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?

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)
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.
UIScreen documentation
Event Handling Documentation is less useful, as it only really applies if you're playing media from the Music App etc.
Hope that helps!

Related

iOS 9 Split screen support for iPhone/iPod app

Is it possible to support iOS 9's multitasking (e.g. split screen) for iPhone/iPod apps as opposed to a Univeral app?
My existing app would need a full UI redesign to look good on an iPad screen, but it would look fine right away on a split screen, which is only half as big.
In my own tests I've only been able to get it to work with a Universal app, but I haven't been able to find any Apple documentation on this yet, so I'm hoping someone here might have some info.
Is it possible to support iOS 9's multitasking (e.g. split screen) for iPhone/iPod apps as opposed to a Universal app?
No.
I haven't been able to find any Apple documentation on this yet
They're not explicit about it, because it seems obvious on its face, as I think you understand. You can infer it from a few places though. For example this documentation says:
In your project’s Info.plist file, in the “Supported interface orientations (iPad)” array, declare support for all four device orientations, as shown here:
It should be obvious that the “Supported interface orientations (iPad)” array won't be read on an iPhone-only app.
This is about device/iOS capabilities (so it's not a dev question per se).
Multitasking is supported on all devices. However, the iPad also adds Slide Over, Split View and Picture in Picture.
On your iPad, you can use multitasking to switch between apps using gestures, use two apps at once, answer emails while watching a video, and more.
Source

Is there any notification which can capture Reachability event on iPhone 6?

iPhone 6/6 Plus have new feature named "Reachability" (Touch twice on TouchID to interact on the larger screen). But I don't find any API in iOS8 SDK documentation.Perhaps I have to wait for the next version of iOS SDK.
I think my App can do something interesting or make some surprise when Reachability active. So anyone has idea for it?
From my reading of the iOS 8.x SDK changes, it's not possible for an app to detect that the user has activated Reachability. I think that Apple want (and expect) that this feature will simply allow access to the top half of the screen, and handles the relocate of the base view completely transparently to the app. I can't point you to any specific documentation on this, as it's a case of the absence of proof being itself proof.
Oh, and I don't think Apple wants any apps doing anything "surprising" when Reachability is activated! ;-)

iOS: popover on iPhone app

In my app for IPHONE I use a popover but I don't know if my app will be reject if I use this element in iPhone app and not in iPad app; do you know if I can have this problem?
thanks
This is no problem and there are many apps having that feature but you need to code it yourself that popover function is not available for iPhone. A app I often use that has that feature is called Week Cal.
Apple can reject for anything. However that being said I have seen numerous applications for iPhone that use custom popovers. Facebook app is just one example. You should be fine as long as you don't use any private API's

Detecting iOS AirPlay screen mirroring capabilities

I've developed a user experience in my iOS app for displaying a different view on an external screen connected via AirPlay screen mirroring or HDMI out. I have a setting to enable/disable this feature, allowing the user to choose between this mode and true mirroring (i.e. same experience on both screens).
Since many iOS devices don't even support external displays (iPhone 3GS and earlier, iPod touches) and some only support HDMI out (iPhone 4, iPad 1, iPad 2 with iOS4), I'd like to tailor the settings UI for each category of device.
I know it's good practice to detect capabilities whenever possible and not to avoid checking the version of the device itself. However, I haven't found anything online about detecting AirPlay support, just how to code for it.
Is it possible to detect AirPlay/HDMI support in the SDK?
(Apple's documentation on developing for external screens:
http://developer.apple.com/library/ios/#documentation/WindowsViews/Conceptual/ViewPG_iPhoneOS/CreatingWindows/CreatingWindows.html)
No, not directly and in a summary fashion.
I think you would probably be best off detecting the device version and using that as the basis of your UI.
If you really believe that is bad practice, I suggest you explore Erica Sadun's UIDevice extensions - you might be able to find in there the code necessary to query enough specific capabilities to create an abstraction that would let you know if a device is AirPlay/HDMI capable. If you do that, I hope you share it!
UIDevice-extension: https://github.com/erica/uidevice-extension
As a side note, don't forget about the VGA adapter. I have tested my app with it at 1080p and it works/looks as good as the HDMI adapter, which was a big surprise to me.

AirPlay Mirroring on iPhone 4

My app uses hardware features of the phone not available on the simulator and i'd like to be able to demo the app for my client via screen sharing. Using AirServer, i can AirPlay to my Mac, but my iPhone 4 doesn't support video mirroring out of the box. Is there any magic that would let me do this? Since this is just for a demo, undocumented APIs are encouraged.
Thanks!
The official way to support external screens is simply to call
[UIScreen screens]
to get a reference to available screens including the external screen. You could grap that feed with a bit of hardware for an awesome screencast.
The process is mentioned in this thread connecting iPad to external monitor. It works equally well on iPhone and iPod. Apples official UIScreen documentation is available here

Resources