tchapgouv / tchap-ios

A Matrix client for iOS
https://apps.apple.com/fr/app/tchap/id1446253779
Apache License 2.0
59 stars 17 forks source link

Bloquer les captures ou enregistrements d'écran #1048

Open NicolasBuquet opened 3 months ago

NicolasBuquet commented 3 months ago

Fix #797

Screen recording can be prevented on iOS by listening to UIScreen.capturedDidChangeNotification and masking the screen content.

But screenshot cannot be prevented. We can be informed the user made a screenshot by listening to UIApplication.userDidTakeScreenshotNotification, but we are informed after the screenshot took place and cannot mask any screen content because it's too late.

But iOS auto mask content of Secured UITextField when capturing or recording screen.

The hack is too embed any view (such as root window) in a Secured UITextField and iOS will mask it on screen apture or recording.

Any screen capture or recording will end in a blank picture or movie in the Photos gallery.

from: https://stackoverflow.com/a/77922186/399439

Testé :