Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent iOS from taking screen capture of app before going into background

You all might know that iOS takes a screen shot of your application before throwing it into the background. This is usually for a better User experience like quick animation to bring the app back and so on. I don't want my app screen shot to be stored on the device, but I want the multitasking to still exist.

I came out with a solution but I'm not sure if I'm heading in the right direction. So, when the applicationDidEnterBackground is called -- I put in an overlay image that will be captured by the OS, and once the app enters foreground, I will remove the overlay. I'm not sure if this is going to work but I'm on my way to implement this. Meanwhile, any other thoughts on this will help me figure out the optimal way of attacking this issue.

like image 603
Mobilewits Avatar asked Sep 22 '11 19:09

Mobilewits


People also ask

How do I stop my iPhone from taking screen shots?

To do so, open “Settings” and navigate to “Display and Brightness.” Swipe down, and then toggle-Off the “Raise to Wake” option. Once this is disabled, your device will no longer wake when you lift it, so it won't be able to take as many accidental screenshots.

Is it possible to prevent screen capture?

Screen Capture protection is possible in Android App, IOS App or IOs browser, but desktop and android browsers can not prevent screen capture. Desktop and Android can have viewer specific watermarking to discourage/deter users from screen capture.


1 Answers

You are on the right track. This is Apple's recommended way to do this as noted in the iOS Application Programming Guide:

Remove sensitive information from views before moving to the background. When an application transitions to the background, the system takes a snapshot of the application’s main window, which it then presents briefly when transitioning your application back to the foreground. Before returning from your applicationDidEnterBackground: method, you should hide or obscure passwords and other sensitive personal information that might be captured as part of the snapshot.

like image 173
Ole Begemann Avatar answered Sep 19 '22 02:09

Ole Begemann