Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Protect content of an iOS application by overlaying a video

Tags:

ios

screenshot

I am working on an Ionic Framework application, and we show critical information on some pages. We like to prevent the user from taking a screenshot on these pages. We are able to do this on the Android platform; however, on iOS devices, we are not able to do so since there is no public API provided by Apple as of today.

We found ScreenShieldKit, but their pricing is too expensive for the function that we will be needing from them. So we came to an idea that how the paid streaming services prevent their users from taking screenshots of their video, we think that overlaying a video element might trick the OS and give a blank screen shot of that portion by going through DRM.

I found out that Safari uses FairPlay, but the internet doesn't have that much implementation or guide on how to do this kind of application. Do you think this is feasible to what we are trying to achieve? Does the DRM work on non-streaming videos? Could you give steps on how to implement DRM EME?

like image 425
Rich Avatar asked Nov 05 '25 18:11

Rich


1 Answers

I’m sure you are aware that a developer can’t entirely prevent a user/app from taking screenshots. In iOS, there is no dedicated API to stop screenshots from being taken; in addition to that, you/developer/app do not have access to delete photos in the photo gallery of the user (which makes sense); so that is why it’s problematic when it comes to iOS compared to Android.

Below I’ll try to help you with some suggestions you might find helpful for you further investigations:

  • there is a way to detect that screenshot was taken using iOS API

For iOS 7+, you may write something like this:

NotificationCenter.default.addObserver(
    forName: UIApplication.userDidTakeScreenshotNotification,
    object: nil, queue: nil) { _ in
        //what to execute after screenshot?
} 

So maybe after one took a screenshot, your app could do, for example, warn, notify, show alerts to other users (if there are many), etc.

  • Also, you may visit this Cordova Plugin to see if it works:

In the README.md file on the GitHub page, it says that

This is a cordova plugin to enable/disable screenshots in android and ios

Finally, the way how ScreenShieldKit works is that it gives a developer a set of UI components (ImageView and Label) which are similar to UIKit ones. It's possible that image and text are rendered as a video protected by DRM, and that is why they are not visible in the screenshots.

like image 111
Asol Avatar answered Nov 07 '25 07:11

Asol



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!