Disable Shareplay / Screen Sharing on iOS 15
IOS 15 Introduces the Ability for People to Share Their Screen via Facetime () - from a Developer Pov, Is There a Way to Disable This for My App? I Can't Find...
iOS 15 introduces the ability for people to share their screen via FaceTime () - 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!
1 Answer
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.