0

We want to disable all Screenshot/Screen Recording capabilities of the app so that this information will be protected, but do not know how to accomplish this using Xcode.

Currently, we are able to detect when a screenshot/screen record is about to take place and we clear the screen and have an alert popup letting the user know that they cannot take images/video of the information displayed on screen, but the problem is that it happens immediately after the screenshot happens. So the images always have the image of the screen and the first frame or so of the screen recording is the screen as well.

We are using an observer for UIScreen.capturedDidChangeNotification in the AppDelegate to do this, but it still isn’t what we are looking for. What we want is that when the app detects the state of capturing to be about to change, the screen to go blank so that the image/video will only be of a blank screen instead of the unobscured information.

NotificationCenter.default.addObserver(forName: UIScreen.capturedDidChangeNotification, object: nil, queue: OperationQueue.main)
Doug Richardson
  • 10,483
  • 6
  • 51
  • 77
JCM4A
  • 9
  • 1
  • 3
    Possible duplicate of [Prevent screen capture in an iOS app](https://stackoverflow.com/questions/18680028/prevent-screen-capture-in-an-ios-app) – Sean Aug 30 '19 at 17:17
  • This does not answer my question because the answers either say it can't be done, or provide solutions using 3rd party software instead of actual Swift implementation. – JCM4A Aug 30 '19 at 17:26
  • 1
    The answer is "it can't be done" – Sean Aug 30 '19 at 17:32
  • @JCM4A - yes, as you've read elsewhere, it can't be done. Also note: even if you *could* prevent captures, the user can grab another phone and take photos / record video of your app anyway. – DonMag Aug 30 '19 at 17:55

0 Answers0