0

Is it possible to hide or blur the whole screen or part of the screen of my app when the user is taking a screenshot as of iOS 11? If I could get the event before the capture I would be able to hide the view, but according to my research, there is an event only after the capture.

All StackOverflow and Google search results say preventing screenshot is impossible, but since I had seen an app that did that (though I am not sure it still works on iOS 11), I cannot easily tell the client it is impossible.

When I had an iPad (iOS 10), I could not capture the screen of one Bitcoin wallet app. I tried to save its recovery key screen, but the screenshot image was blurred or something (I cannot remember exactly). I think the app's name was Bread. Unfortunately, right now, I do not have an iOS device, so I cannot test it.

How did the app do it? Did the app modify the captured image after the screenshot event? Is it possible to modify the screenshot silently?

jscs
  • 63,694
  • 13
  • 151
  • 195
Damn Vegetables
  • 11,484
  • 13
  • 80
  • 135
  • There's a `UIApplicationUserDidTakeScreenshot`notification. But I've never tried if it is send *before* or *after* the screen shot was taken. But it's worth a try. – D. Mika Oct 22 '17 at 11:19
  • According to my research, that is AFTER the screenshot. And unfortunately, there seems to be no way to get that event in iPhone Simulator. – Damn Vegetables Oct 22 '17 at 11:24

1 Answers1

0

I think you can add a view in the applicationWillResignActive(_ application: UIApplication) method in you appDelegate. For example you can add a blur view in this delegate method so you screenshot will be blurred. This delegate method is called the moment the home button is tapped once or twice.

EmirC
  • 468
  • 5
  • 14
  • 1
    this will not work if user try to take screenshot using Home+Power button.but i see many application also prevent ScreenShot from Home+Power button like confide,blackbox game. – Bhavesh.iosDev Jan 22 '19 at 09:32