Where can I find iOS dual display for Apple TV documentation? - ios

Would anyone know the whereabouts of the documentation on how to implement AirPlay dual-screen functionality into an app?
e.g. http://www.apple.com/uk/appletv/airplay/

This link has very brief, but from what I can see totally sufficient information if you scroll down to "Make the Most of a Second Display".
In short, you register for notifications on a connect to an external display to get a handle to it, and switch between drawing on the two displays by using setScreen(). Besides that, everything drawing related should be "the usual".

Overview
The user can connect additional screens to an iOS device at any time using AirPlay or a physical cable. Each additional screen represents new space on which to display your app’s content, and is managed by a UIScreen object. For example, a game might show its content on a connected display and show game controls on the iPhone screen, as illustrated in Figure 1. Displaying Content on a Connected Screen

Related

Disable SharePlay / screen sharing on iOS 15

iOS 15 introduces the ability for people to share their screen via FaceTime (https://www.apple.com/uk/newsroom/2021/06/ios-15-brings-powerful-new-features-to-stay-connected-focus-explore-and-more/) - from a developer POV, is there a way to disable this for my app?
I can't find any information on how this might be possible and, similar to screenshot functionality, I fully expect that the answer is no.
However, I've been asked to investigate - hence this question.
Many thanks for the help!
You can't opt-out as such, but you can detect that screen sharing is active and adapt your UI in response. For example, you could overlay a view stating "Screen sharing not available" or similar.
Apple describes this technique in this technote but, in summary:
You can listen for the capturedDidChange notification and when you receive this notification, you check the isCaptured property of UIScreen - If it is true then the screen is being shared to some external destination; This could be via a screen recording a broadcast extension, AirPlay, Quicktime capture via cable or the new SharePlay feature, but you probably want to handle all of these in the same way.

How can I use ARKit while using Slide Over/Split Screen on iPadOS?

I have an app that uses ARKit to detect faces and send over the network the coordinates of interest, which works well. I would like this app to run in background, still sending the data over the network, while I would be using another app (almost) fullscreen.
The option 'Enable multiple windows' is activated in info.plist, but as soon as I launch my other app, the ARKit app stops sending information (the app actually probably stops).
Is there a simple way to do this, and at least is this feasible? Thanks!
This is not possible at this point. Camera and AR stuff is disabled at a system level in apps when they are displayed in Slide Over or Split View.
I'd recommend displaying a warning message when Slide Over/Split Screen is being used saying that you should use the app in full screen mode. See this answer under a different question for details.

ios Objective-C how to display different video feed on big screen

According to the first comment at the end of this article:
http://www.imore.com/keynote-iphone-ipad-review
And here:
http://help.apple.com/keynote/ipad/2.2/#/tand1a4ee7c
It seems that you can configure keynote for iPad, such that you can see speaker notes on the iPad when you're using a dongle to plug into a projector or big screen; but not on the big screen.
Is this functionality only afforded to Keynote through some private API in the OS level? or does anyone know of a way of achieving this programatically? My use case doesn't need to make it into the app store - so a private API hack could work for me.
No need for private API's. You can observe UIScreenDidConnectNotification notifications for when a second screen is connected whether it's airplay or hdmi.
You then provide a View/ViewController for that screen.

Not able to push a custom view to external display using airplay (Apple TV)

Trying to show a custom screen on an external display connected to apple tv using airplay. We are also trying to stream audio via AppleTV after the pairing. (Audio is optional here, it's good to have but not required).
The problem is, if we do audio playback (using AVAudioPlayer), it works fine as expected, but cannot display the custom screen. On the other hand, selecting it from the Control Center makes it work fine except that we don't want to mirror the screen, we want to display a custom view.
Any help in this regard is much appreciated.
Uploaded a sample code for the AirPlay issue in dropbox - https://dl.dropboxusercontent.com/u/1307156/AirplayDemo.zip
What you're trying to do is actually quite simple:
Once an external screen has been added you can create a new UIWindow, a new UIViewController, which will be controlling your custom view displayed to the external screen, and set that just created window to the external UIScreen.
// new window binding
newWindow.screen = externalScreen;
[newWindow makeKeyAndVisible];
You can observe changes over external screens (a screen added, removed, changes over screenModes) through the NSNotificationCenter and do something accordingly for your purposes.

Advertisements in blackberry app

In my blackberry application,i am displaying advertisements in screen.But only 2 ads were displaying in a screen at a time.Is there any other option to display more ads?
Please help.
I am working on both OS6 and OS7.
Thanks in advance.
Yes there is, create a seperate Object for your Banners.
The Advertising Service API can support up to two active Banner
objects on a screen at one time (only one for BlackBerry 6).
If your application displays more than one ad (even if on different
screens), you should create a separate Banner object for each ad
placement.
Reusing a Banner object in multiple locations, might cause ads to
display incorrectly.
You shouldn't attempt to remove a Banner object from a screen without
removing the containing field manager as well, as this can lead to
issues with other Banner objects.
Using a FlowFieldManager object to display Banner objects might cause
ads to display incorrectly.
(Taken from the official Blackberry Page)
Link: BB APP ADVERTISEMENT

Resources