How can I turn on AirPlay screen mirroring on iPhone 4S

I wrote an application for the iPhone, and for 4S I want to support mirroring the application screen over AirPlay.

Using the System AirPlay picker and with mirroring turned on, it will reflect the application without any problems.

I would like to suggest this collector in the application and used the following base code:

MPVolumeView *volumeView = [ [MPVolumeView alloc] init] ; [volumeView setShowsVolumeSlider:NO]; [volumeView sizeToFit]; [self.view addSubview:volumeView]; 

This is provided by the AirPlay picker, and I can choose the Apple TV. However, this does not affect the content of AirPlay. When I go to the system builder, it shows that AppleTV is selected, and to enable mirroring I have to use the switch here.

So, the question is how to enable mirroring in the application when the user selects AirPlay using the application?

thanks

+5
source share
2 answers

The only way to programmatically enable mirroring is to use private APIs. See here

+5
source

I am sure that mirroring can only be enabled from the menu represented by the system in the multitasking panel.

+1
source

Source: https://habr.com/ru/post/906979/


All Articles