iosfacetimeios15

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!


Solution

  • 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.