![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
rn-screenshot-prevent
Advanced tools
A React Native package to block screenshots and screen recordings, providing protection for sensitive app content. Supports both Android and iOS platforms.
$ npm install rn-screenshot-prevent --save
pod install
in your ios folder$ react-native link rn-screenshot-prevent
Libraries
➜ Add Files to [your project's name]
node_modules
➜ rn-screenshot-prevent
and add RNScreenshotPrevent.xcodeproj
libRNScreenshotPrevent.a
to your project's Build Phases
➜ Link Binary With Libraries
Cmd+R
)<android/app/src/main/java/[...]/MainApplication.java
import com.killserver.screenshotprev.RNScreenshotPreventPackage;
to the imports at the top of the filenew RNScreenshotPreventPackage()
to the list returned by the getPackages()
methodandroid/settings.gradle
:
include ':rn-screenshot-prevent'
project(':rn-screenshot-prevent').projectDir = new File(rootProject.projectDir, '../node_modules/rn-screenshot-prevent/android')
android/app/build.gradle
:
implementation project(':rn-screenshot-prevent')
// sample code
import RNScreenshotPrevent from 'rn-screenshot-prevent';
/* (IOS, Android) for android might be the only step to get secureView
* on IOS enables blurry view when app goes into inactive state
*/
RNScreenshotPrevent.enabled(true/false);
/* (IOS) enableSecureView for IOS13+
* creates a hidden secureTextField which prevents Application UI capture on screenshots
*/
if(!__DEV__) RNScreenshotPrevent.enableSecureView();
/* (IOS) enableSecureView for IOS13+
* creates a hidden secureTextField which prevents Application UI capture on screenshots
* and uses imgUri as the source of the background image (can be both https://, file:///)
*/
if(!__DEV__) RNPreventScreenshot.enableSecureView(imgUri);
/* (IOS) disableSecureView for IOS13+
* remove a hidden secureTextField which prevents Application UI capture on screenshots
*/
if(!__DEV__) RNScreenshotPrevent.disableSecureView();
/* (IOS) notification handler
* notifies when user has taken screenshot (yes, after taking) - you can show alert or do some actions
*
* @param {function} callback fn
* @returns object with .remove() method
*/
addListener(fn);
/** example using the listener */
useEffect(() => {
const subscription = RNScreenshotPrevent.addListener(() => {
console.log('Screenshot taken');
showAlert({
title: 'Warning',
message: 'You have taken a screenshot of the app. This is prohibited due to security reasons.',
confirmText: 'I understand'
});
})
return () => {
subscription.remove();
}
}, []);
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
Made with create-react-native-library
FAQs
A React Native package to block screenshots and screen recordings, providing protection for sensitive app content. Supports both Android and iOS platforms.
The npm package rn-screenshot-prevent receives a total of 143 weekly downloads. As such, rn-screenshot-prevent popularity was classified as not popular.
We found that rn-screenshot-prevent demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.