Alexandr Kolesnik
Alexandr Kolesnik

Reputation: 2204

Disable screenshot like Confide

In my app I need to disable screenshots, I know it is possible to handle when screenshot already done. Maybe somebody knows how to prevent screenshots like app "Confide" do? Or maybe somebody has ScreenShieldKit SDK? Here is the link to read https://apptractor.ru/info/news/confide-vyipuskaet-zashhitu-ot-snyatiya-skrinshotov-na-ios.html

Upvotes: 4

Views: 4391

Answers (1)

Sergey Grishchev
Sergey Grishchev

Reputation: 12051

While you wait for response form Confide, I suggest you use this Swift 4 code snippet to detect screenshots that were taken:

NotificationCenter.default.addObserver(forName: NSNotification.Name.UIApplicationUserDidTakeScreenshot, object: nil, queue: OperationQueue.main) { notification in
     // screenshot was detected
     print("Detected screenshot")
}

This is as far as you can get right now in terms of legal AppStore iOS development. One interesting thing is that right now on iOS you can actually trigger screen capture and there's almost no way to protect against it if your app is not a video player and doesn't use the AVPlayer components (then iOS will obscure the screen for you automatically).

I can add that from my experience this is a pretty non-trivial task and I'm sure that the solution of Confide will cost a shitload of money.

And by the way, I know one sure way their solution (or anyone's solution) will fail - it's when you take a photo of your phone's screen with some other device. So, philosophically speaking, why bother with a half-baked solution?

Upvotes: 3

Related Questions