it-dgc-verificaC19-ios
it-dgc-verificaC19-ios copied to clipboard
Do not allow screenshot when the certificate info is visible
Describe the bug
User can perform a screenshot when certificate info are shown on the screen
Expected behaviour
Do not allow screenshot when the certificate info is visible
Steps to reproduce the issue
Scan a certificate, then try to perform a screenshot
Technical details
- Host Machine OS: iOS
Unlike Android, is not possible to prevent screenshots on iOS, since Apple doesn’t provide any native method.
Apple provides only these functionalities to prevent/interact with screenshots:
- Textfield with “Secure Text Entry” attribute. This attribute is usually checked by the developer in password textfields. In this case iOS natively hide the content during screenshots or screen recordings.
- NotificationCenter Subscribing on “UIApplication.userDidTakeScreenshotNotification” events the developer can know if the user has taken a screenshot, but this is a post-event info
- FairPlay Streaming This functionality prevents taking screenshots or recording screen during a video streaming. (It is used from apps like Netflix). Only the streaming is obfuscated (black screen) but the UI is visible on the screenshot.
Another third party technology is ScreenShieldKit, that should wrap the FairPlay Streaming functionality, dealing views like streaming videos.
So, I think we shouldn't consider this app behavior as a bug
That's clear @Andrea-Prosseda . The first solution looks great, but we should prevent screenshots on the camera activity. To generally solve this problem why not delete the last saved image of the taken screenshot after the userDidTakeScreenshotNotification
event? It may require additional permission but it looks to be the only workaround possible.
Does the UIApplication.userDidTakeScreenshotNotification
also fire when a screen recording is on? Also, if the user starts recording before opening the app and ends it after closing the app, the video won't be deleted.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.