New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-native-screenshield

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-screenshield

Prevent Screenshot Image

1.1.0
Source
npm
Version published
Weekly downloads
2
-81.82%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-screenshield

Prevent Screenshot Image, block doing screenshot dynamically in your iOS/Android app.

For iOS - using ScreenShieldKit

For Android - using flag FLAG_SECURE

Installation

  • STEP 0 - IMPORTANT - only for want support iOS - put ScreenShieldKit.framework in ios project dir.
npm install react-native-screenshield

or

yarn add react-native-screenshield

Linking

ReactNative auto-linking will do the magic for you.

API

ProtectedView props:

namerequireddesc
sourceyescheck RN Image prop
styleyescheck RN Image prop

It also accept all RN Image props.

Methods:

namedesc
init(key?: string): voidiOS - key is required - ScreenShieldKit License, Android - not required, not used
isInitialized(): booleanReturn if module was initialized

Usage

import ScreenShield from "react-native-screenshield";

// ...
ScreenShield.init('abdc'); // config for iOS and Android
or
ScreenShield.init(); // it will just work for Android then, on iOS fallback `Image` component will be used for `ProtectedView`
// ...

<ProtectedView source={image} style={{ width: 100, height: 100 }} />

License

MIT

Keywords

react-native

FAQs

Package last updated on 24 Feb 2020

Did you know?

Socket

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.

Install

Related posts