0

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!

Sam
  • 321
  • 2
  • 12
  • Perhaps this https://developer.apple.com/library/archive/qa/qa1970/_index.html#//apple_ref/doc/uid/DTS40017687 ? – Paulw11 Aug 16 '21 at 18:29
  • @Paulw11 - that looks like it does the trick actually. Can't believe I didn't think of that! If you want to post that as an answer I'll happily accept. – Sam Aug 17 '21 at 08:40

1 Answers1

0

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.

Paulw11
  • 108,386
  • 14
  • 159
  • 186