Detecting iOS AirPlay screen mirroring capabilities - ios

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.

Related

AppStore - iPhone 6S or iPad Pro or ForceTouch device only [duplicate]

Is there a way to write an app's "Required device capabilities" such that the app runs only iPhone 6s and above (due to a requirement of force touch)?
You normally use the UIRequiredDeviceCapabilities key, which can require certain features to be present. However at this time it doesn't seem like 3D Touch has been added.
A large warning will have to suffice for now, while waiting for apple to add 3D touch as a thing you can require. Otherwise there might be some features only the new iPhones models have, such as the arm chip, you could require. I haven't looked into this though.
On apples page for documentation you can see available keys for the UIRequiredDeviceCapabilities, where 3D Touch doesn't seem to be present.
open https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW3
No, at this time it is not possible.
It is likely that Apple will introduce a new value to use with the UIRequiredDeviceCapabilities key.
Until that time, the best you can do is require one of (arm64, metal or opengles-3), and one of something like telephony or sms (until iPads get 3D Touch). This will at least restrict your app to the iPhone 5S and up.
And put a notice in the app description that your device requires 3D Touch.
Keep an eye on this document for all the possible device capability values:
https://developer.apple.com/library/ios/documentation/DeviceInformation/Reference/iOSDeviceCompatibility/DeviceCompatibilityMatrix/DeviceCompatibilityMatrix.html
Also, this is handy:
http://28byteslater.com/ios-compatibility/?exclude=&require=22,7,19,26#chart

ipad airplay mirroring to multiple airplay receivers (specifically for videos/pictures)

my client asks me to develop some app for real-estate presentation which has the following features:
1. The seller can have their ipads connect to the projector wireless over wifi.
2. The seller can broadcast the screenshot of some other ipads to the customers's ipads.
For feature 1, I can have a apple TV and airplay mirroring the ipad screen to it, then have some HDMI-VGA adapter for the connection with the projector.
For feature 2, I can also install airfloat to make the ipad an airplay receiver. I can also airplay mirroring the screen of the seller's ipad to the customer's ipad.
As for as I know, it seems to be no way to airplay mirroring the screenshot of one ipad to multiple ipad airplay receivers.
So I'm wondering how can I airplay mirroring one screen to many ipad airplay receivers?
How about you use airview or airplay receiver like in this link? It seen like we need to solve some problem to use.
https://github.com/nto/AirView
Another one is you can use this SDK. It has screen sharing and gesture sharing from one device to another device. It seen quite good.
http://www.showkit.com/
Our rPlay airplay mirroring software implemented the features you asked. rPlay acts as Apple TV, you can mirror ios devices to it, rPlay can also duplicate displays to other rPlay devices, the result is one ios device sends its screens to multiple devices.
We are also develop viewers for mobile devices to receive rPlay displays.
Check our forums at http://www.vmlite.com for more info

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

AirPlay Mirroring iPhone to Mac OS / using UIWebView + AirPlay

I need to live-demo a Mobile Safari browser app (iOS 5, iPhone 4S) on my Macbook and was wondering the best way to do this?
One way I thought might be possible would be using AirPlay Mirroring, but there doesn't seem to be any Mac OS apps capable of showing my iPhone screen mirrored.
I am an (beginner) iOS developer and wondered if there was anyway I could knock up a basic app with a UIWebView in it to somehow stream the contents of the web page and my interactions with it to my Mac.
Any thoughts?
EDIT: Yes I know I could use the iPhone Simulator, but I need to interact with it on the handset using the mobile phone network.
The situation has changed since this was asked.
AirServer (AirServerApp.com) and Reflection (ReflectionApp.com) both support AirPlay mirroring. Here's an article comparing them:
http://www.macstories.net/reviews/mirroring-multiple-ios-devices-to-a-mac-comparing-airserver-and-reflection/
Since your device (iPhone 4s) supports video mirroring via AirPlay, then you should be able to use AirServer to enable mirroring to your Mac.
Update: As pointed out by Marc Surman, AirServer does not support mirroring, rendering this answer incorrect. Thanks for playing.
Mirroring uses FairPlay encryption, which is why AirServer and similar applications can't do mirroring.
You CAN, however, fake this using AirplayKit:
https://github.com/rothacr/AirplayKit
The iOS demo in that repo actually does a simple mirror by sending an image of your screen to the airplay device using a timer. It would probably work just fine for a demo, and should work with AirServer.

What should I grab as a development platform, an iPod or an iPad?

I've recently gotten into the world of contract programming, and two of my clients have indicated that they'd like to do something 'trendy', like ipod touch/iphone/ipad development. I have a mac laptop (first gen macbook pro) that I'll have to upgrade to snow leopard to do the development for any of them, from what I've read. So that's already a bit of a commitment, given all the stuff I have on that laptop I'll have to make sure is recoverable from backup.
My budget is limited, but I think I need to learn this skill. Which device should I get to learn this kind of development, an iPod touch or an iPad? I don't have the money for an iPhone.
I think that the iPhone/iPad SDK has an emulator mode, but I like to have the device I'm going to roll out on available to make sure that everything works as I'd expect, ie, what's easily readable on a laptop screen is still readable on the touch, etc.
iPad - since you can simulate the others on your mac and the iPad.
Right now, there's way over a hundred thousand apps for the iPhone and iPod Touch, so I'd suggest developing for the iPad. There's a lot fewer apps to distinguish yourself from.
You can use iPhone apps on an iPad, but I wouldn't recommend pushing them out without testing them on a real iPod Touch or iPhone. The feel will be much different. For example, I type on my iPhone one-handed while holding the phone in one hand, but the Ars Technica review of the iPad says this isn't really feasible on the iPad.
I'd get the iPad. I've been using an iPhone and now an iPad for dev work, and the iPad will run iPhone only apps at the iPhone screen size. Unless you need a camera its the best choice in being able to run apps developed for any iPhone OS device. You just should remember that app performance on an iPad will be much better then on a iPhone/iPod touch. Since it's contract work I assume its more along the lines of utilities, or basically their site as an app. So 100% performance testing isn't as crucial as a 3D game.
Ideally, you would always test apps on the actual target device. So, if you want to build iPad apps, you get iPad. If you want to build iPhone apps, you get iPhone or iPod Touch. iPad will run iPhone apps, but you will not be able to test for performance neither in simulator nor in iPad. Performance is always a concern on iPhone-class devices. Plus you cannot really evaluate the full iPhone user experience on iPad, because the physical form factor and screen resolution/pixel density and many other details are different.

Resources