JayantBadlani / ScreenShield

ScreenShield is an iOS library that provides a simple way to protect your app's content from being captured or recorded by screenshots, screen recordings, or other screen capture methods. It works by adding a secure layer on top of your views, which prevents most screen capture mechanisms from recording the underlying content.
MIT License
89 stars 15 forks source link

How to use React Native to prohibit screenshots? #13

Closed YinWeiLF closed 1 month ago

YinWeiLF commented 4 months ago

How to use React Native to prohibit screenshots? I use the method of prohibiting screenshots in React Native, The entire page of the app has turned black and cannot be used normally. Can you give an example of how to use the method of prohibiting screenshots in RN? Can I freely control whether screenshots are allowed on a certain page in RN?

richardo2016 commented 2 months ago

How to use React Native to prohibit screenshots? I use the method of prohibiting screenshots in React Native, The entire page of the app has turned black and cannot be used normally. Can you give an example of how to use the method of prohibiting screenshots in RN? Can I freely control whether screenshots are allowed on a certain page in RN?

The codebase includes the most code to support prevent-screencapture for React Native but need to be a little modification, I know how to make it work(I have used it in my own React Native App).

I can take a PR to add necessary code & documentation for this repository,but I'm too busy recently. If you're not eager for that, I will mention this issue in the PR after it complete.

JayantBadlani commented 1 month ago

@YinWeiLF , As mentioned by @richardo2016 , the README has been updated with the necessary guidance on how to prevent screenshots in React Native. This should help you implement the feature properly without any issues. Therefore, we're closing this issue. Thank you!