-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(IT Wallet): [SIW-1945] Disable screenshots and recordings on ITW screens #6595
base: master
Are you sure you want to change the base?
Conversation
Jira Pull Request LinkThis Pull Request refers to the following Jira issue SIW-1945 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest a quick search through the app files to remove any react-native-flag-secure-android
leftovers:
- Manual linking in
settings.gradle
; - Entry in
patches.md
and the related patch; - A type definition under
ts/@types/react-native-flag-secure-android
.
On iOS, is still possibile to see the screen content when navigating back. I think we should improve the IMG_0088.MP4 |
This happens because the route changes before the screen is correctly unmounted. To solve this we need to rethink how we handle screen capture prevention. A great example is how the Expo team implemented it. Take a look here: https://github.com/expo/expo/blob/main/packages/expo-screen-capture/src/ScreenCapture.ts#L84 When a component which uses the I find this approach very simple and effective. I think we should implement something similar! What do you think? |
Good catch @mastro993! I'll work on something like the Expo solution. |
Short description
This PR prevents screenshots and screen recordings in several IT Wallet screens. In order to work on iOS,
react-native-flag-secure-android
(currently used) has been changed withreact-native-screenshot-prevent
.The implementation is the following:
FLAG_SECURE
option;List of changes proposed in this pull request
react-native-flag-secure-android
react-native-screenshot-prevent
screenBlackList
How to test
Ensure it is not possible to take screenshots or record the content of the screen in the following:
Be sure to disable debug mode, because
isAllowedSnapshotCurrentScreen
always returns true in debug.Note
iOS does not seem to offer a direct API to disable screenshots.
react-native-screenshot-prevent
makes use of a workaround solution, so please test it thoroughly on iOS.