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

This library is an incorrect way of detecting screenshots, apple warning!!! #7

Open
lcodetechgitrep opened this issue Oct 29, 2024 · 0 comments

Comments

@lcodetechgitrep
Copy link

lcodetechgitrep commented Oct 29, 2024

As with all implementation which claims to detect "screenshots", this uses UITextfield and adds it as a sublayer, which apple is warning not to do, as views are supposed to be added as subviews not layers

Check response from apple's engineer in the below link

https://forums.developer.apple.com/forums/thread/722333

**There is no intended functionality to prevent a screenshot – screenshots are a user controlled feature intended to always be available. Consider that a sufficiently motivated user will simply use another device to take a picture of the screen and you cannot prevent that. Similarly by forcing a user to do that your creating a less secure situation, as the image will now be on 2 devices instead of 1 and will be harder for the user to maintain control over.

Additionally the code you use above is going behind UIKit to add a view's layer to another view's layer – this will cause subtle and not to subtle issues depending on exactly what your app ends up doing – it may even be the cause of your interaction issues. UIViews are intended to only be added to other views via addSubivew() and related methods, not via their layers.**

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

No branches or pull requests

1 participant