Skip to content
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

Fix screenshot prevention on iOS #43

Closed
wants to merge 2 commits into from

Conversation

GianniCarlo
Copy link

Bugfix

  • Fix screenshot prevention on iOS 17 not working

Related issues

#28

Approach

  • Update enableSecureView to create the textfield, and then add the layer to the keyWindow layer, which should be outside the RN rendering cycle
  • Update disableSecureView to remove the textfield layer from the window layer

Things to be aware of / Things to focus on

  • In my workplace we only needed the screenshot prevention feature to work, so I removed the image functionality, but this could be the proof of concept needed, as I think we can just add the image as a background to the textfield and it should work
    • I did test that we can show a different color for the background

Screen recording

20240523_112208.mp4

@killserver
Copy link
Owner

this fix - remove support "imagePath" param for "enableSecureView" method )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants