Skip to content

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

@lcodetechgitrep

Description

@lcodetechgitrep

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.**

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions