I need to prevent screen capture

I need to prevent screen capture by users of my app, for security reasons. The contents I display are confidential and should not be copied onto the device.

Accepted Reply

There is an isSceneCaptured property you can monitor.

  • Does seem to be a SwiftUI novelty. I can't seem to post YouTube links but Kavsoft has a video detailing how to achieve this. Google: "kavsoft prevent screenshot"

  • isSceneCaptured works on SwiftUI, Im using UIKIt, do we have this option?

  • Now that you mention it, it would surprise me if SwiftUI had a trick UIKit couldn't do. I'm mostly UIkit too. So I did some searching and the video looks like it's actually a SwiftUI conversion of a UIKit trick. Which is posted here by orakull. It doesn't work as is. But if you look at the last comment by Richard de Bock, that change works.

Add a Comment

Replies

There is an isSceneCaptured property you can monitor.

  • Does seem to be a SwiftUI novelty. I can't seem to post YouTube links but Kavsoft has a video detailing how to achieve this. Google: "kavsoft prevent screenshot"

  • isSceneCaptured works on SwiftUI, Im using UIKIt, do we have this option?

  • Now that you mention it, it would surprise me if SwiftUI had a trick UIKit couldn't do. I'm mostly UIkit too. So I did some searching and the video looks like it's actually a SwiftUI conversion of a UIKit trick. Which is posted here by orakull. It doesn't work as is. But if you look at the last comment by Richard de Bock, that change works.

Add a Comment

This gets asked a lot, and the answer always amounts to: this is an unrealistic requirement and it’s impossible to implement a perfect solution.

Search the forum to find lots of old discussions. Here’s a thread with an especially clear and logical argument: link.