Is it possible to implement screenshot protection for iOS app?

Our app is using react native and native swift code to build an iOS app. We have some screens in both sides need to be protected if user is trying to capture a screenshots of it.

We are trying to workaround to implement this screen protection by using UITextField and set isSecureTextEntry = true

But there are some issues that we are facing as below:

  • App is hang after go back from a screen that's is protected
  • When app go back from a protected screen there is a black screen show up when screen is transiting back
  • If we do protect entire screen from React Native side, there are leaking memory in react native screen and it can not be free up

Do we have any other solution to prevent screenshot or can we fix above issues and continue using UITextField to implement it?

Thanks for the post.

Are you able to demonstrate the issue in a test project created from one of Xcode's templates, and using only Apple APIs? If not, you should check with the support resources provided by the 3rd party to get assistance with their software.

Unless another developer in the forums has experience with the third-party and can provide assistance.

Albert  WWDR

iOS does not provide an API to prevent screenshots. The isSecureTextEntry behavior on UITextField is designed to obscure sensitive text entry, so relying on it that way is using it outside its intended purpose isn’t recommened. Imagine a case where the user uses a second device to take a photo of the screen and you can’t stop the capture.

That said, you do have the access to the sceneCaptureState API which detects capture scenarios such as screen recording, AirPlay mirroring, and remote control sessions. Checkout Protecting sensitive content when screen sharing and remote control are active for a deep dive.

Is it possible to implement screenshot protection for iOS app?
 
 
Q