npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@wuilmerj24/screen-protector

v1.0.3

Published

A NativeScript plugin to enhance app security by preventing screenshots and screen recordings. Includes real-time detection of capture events on iOS and automatically applies screen protection on both Android and iOS. Ideal for protecting sensitive conten

Readme

npm version npm downloads NativeScript compatibility Android Support iOS Support

@wuilmerj24/screen-protector

A NativeScript plugin to protect sensitive content from screen capture and recording.
This plugin provides API methods to block screenshots and detect screen recording events — with native support for both iOS and Android.


📦 Installation

npm install @wuilmerj24/screen-protector

📱 Platform Support

| Feature | Android | iOS | |---------------------------|:-------:|:-------:| | Block Screenshots | ✅ | ✅ | | Block Screen Recording | ✅ | ✅ | | Detect Screenshots | ❌ | ✅ | | Detect Screen Recording | ❌ | ✅ |


🚀 Usage

Import the plugin

import { ScreenProtector } from '@wuilmerj24/screen-protector';

Initialize and use

const protector = new ScreenProtector();

// Block screenshots
protector.lockScreenShoots();

// Optionally set up listeners (iOS only)
protector.setScreenshootEvent(() => {
  console.log('📸 Screenshot detected (iOS)');
});

protector.setScreenRecorderEvent((isRecording: boolean) => {
  console.log('📹 Screen recording changed:', isRecording);
});

To remove protection

protector.unlockScreenShoots();

// Remove observers (iOS only)
protector.removeScreenShootObserver();
protector.removeScreenRecorderObserver();

🧪 API

lockScreenShoots(): boolean

Blocks screenshots and screen recordings:

  • On iOS, it uses a secure UITextField to force the system to blur the screen.
  • On Android, it sets FLAG_SECURE to prevent all screen capture mechanisms.

unlockScreenShoots(): boolean

Restores the normal behavior, allowing screenshots again.


setScreenshootEvent(callback: () => void): void

iOS only

Registers a listener that fires when the user takes a screenshot.


setScreenRecorderEvent(callback: (isRecording: boolean) => void): void

iOS only

Registers a listener that tracks whether screen recording is active (true or false).


removeScreenShootObserver(): void

iOS only

Removes the screenshot observer.


removeScreenRecorderObserver(): void

iOS only

Removes the screen recording observer.


📝 License

Apache License Version 2.0


👨‍💻 Author

Maintained by @wuilmerj24

License

Apache License Version 2.0