Can we programmatically enable/disable Airplay mirroring?

I want to write a demo app that can show the mirroring option within the app.


Basically I want to showcase that AirPlay mirroring can be enabled/disabled from within the App.

Does Apple allow enable/disable mirroring functionality from within the iOS App programmatically?

Thanks.

Replies

See https://developer.apple.com/documentation/avfoundation/airplay_2/getting_airplay_2_into_your_app


Just to be clear about your question, tho, you can choose to allow airplay or not in your app, but you can't control use of it outside of your app.