AirPlay Screen Mirroring in IOS - objective-c

I want to apply screen mirroring through code.In iOS 11 and below we can achieve this task with MPVolumeView class
https://developer.apple.com/library/archive/documentation/AudioVideo/Conceptual/AirPlayGuide/EnrichYourAppforAirPlay/EnrichYourAppforAirPlay.html
In iOS11 and later iOS The above class does not work for Screen Mirroring as it's only works for Audio mirroring (Airplay2).
I also try AVRoutePickerView, but it is also working for audio mirroring only((Airplay2)).
In simple through code I want the same result with we can achieve with "Control Centre" "Screen Mirroring" button.check below video (1min 18secs in) for "Screen Mirroring" exact location.
https://www.youtube.com/watch?time_continue=80&v=wbWXNESUZ5w
Please check the attach image for exact location of screen mirroring button
Thanks

Related

Is it possible to programmatically force an ios ap in split view to go full screen in ios9?

I am developing this app for ipad and ios9 and at some point the user will click on a button to watch a video. But I wouldn't want the user to just see it in the split view size he's currently on (like 1/3rd or 14th) instead I would like the app to close the other open app and for it to take over the entire screen.
Does anyone know if that's possible? Thanks.
By-default, the video always get played in full-screen mode. When video playing is finished, the player gets dismissed and you will see your screen (from where you played the video). In your case, in split view controller.
Do let me know if you need further details.

record app using iOS and Yosemite, but can only see black screen

I am trying to record a video of my app using QuickTime and the new iOS record feature in Yosemite. Problem is all I get is a black screen. Can anyone assist?
I found the solution. It wasn't able to see video until I switched from my Blue microphone to the iPad's built-in one.
in the QuickTime Player go to > File > New Movie Recording
Click the Arrow (that points down) next to the red Circle
in the Camera choose your iOS device , if it not showing , unplug and plug your iOS device again. if you would like to record the sounds that your iOS makes , change the Microphone as well.
Hope this helps.

can I run movie player in background when mirroring to external screen - objective c

I have an application that plays video from local disk and when a second screen is connected (through AV composite cable) it switch the movie view to the external screen. this is working fine so far. what I want is, when the user press the home button and the app goes to background mode; I want to continue playing the video in the second screen while the app is running in the background mode. this works for audio, as I have set my application to continue play audio in background mode and it is working fine: the audio continue to play in the background mode fine. now is it possible to continue play video as well, and how?
This is not possible. It is outside of the scope of an iOS app to continue powering a screen while it is in the background.

Playing music on a Mac in lock screen and display off

I have an app with a behavior that I want to copy. The app can play music in the lock screen state. The app can also turn off the screen at this state. I'm not too sure if the app is placing the Mac in sleep mode but the white indicator light on the front of the Mac book is on but is not pulsing while the display is off.
I know how to play music and place the mac in the lock screen state using apple script. What I don't know how to do is turn off the display and have the indicator light turned on. This behavior is similar to when the Mac is in sleep mode. Any ideas as to how this can be done programmatically using objective-c and/or apple script?
I cannot use anything that is not documented by Apple. I am running the latest version of OSX Lion.
If you hold down the command, shift and eject buttons at the same time, the screen goes dark instantly. I just confirmed this in 10.7.1.
As for Applescripting Display Sleep, it's not trivial. I did find a probable solution in this thread:
http://macscripter.net/viewtopic.php?pid=135732#p135732
Give it a try and see if it accomplishes what you are looking for.

How do I do screen mirroring on iOS 4.3?

Apple's Developer documentation said that screen mirroring is available on iOS 4.3 without any magic. One should just use the mirroredScreen property, but it's readonly.
From Apple's developers.apple.com:
mirroredScreen
The screen being mirrored by an external display.
...If mirroring is supported and currently active, this property contains the screen object associated with the device’s main screen. This represents the screen being mirrored by the attached display. The value of this property is nil when mirroring is disabled, not supported, or no screen is connected to the device.
To disable mirroring and use the external display for presenting unique content, create a window and associate it with the corresponding screen object.
It said how to disable but not how to enable mirroring mode. How do I do it?
I want to mirror my app on the projector without creating copies of my views and update them when needed - it looks bad.
Also the simulator crashes often on using external screen emulation - is it okay?
On compatible devices, iOS will automatically mirror the display when an external screen is attached.
I think currently only iPad 2 support mirroring. You can listen to notification when a external display is connected.
http://imthi.com/blog/programming/uiscreen-notifications-for-connecting-external-display-in-ios.php