react-native-prevent-screenshot-ios-android
Version:
This package is used to block taking screenshot, screen recording and screen sharing of specific screens for both Android and IOS apps
32 lines (31 loc) • 1.21 kB
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.allowAndroidShare = allowAndroidShare;
exports.disableSecureView = disableSecureView;
exports.enableSecureView = enableSecureView;
exports.forbidAndroidShare = forbidAndroidShare;
var _reactNative = require("react-native");
const LINKING_ERROR = `The package 'react-native-prevent-screenshot-ios-android' doesn't seem to be linked. Make sure: \n\n` + _reactNative.Platform.select({
ios: "- You have run 'pod install'\n",
default: ''
}) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n';
const PreventScreenshotIosAndroid = _reactNative.NativeModules.PreventScreenshotIosAndroid ? _reactNative.NativeModules.PreventScreenshotIosAndroid : new Proxy({}, {
get() {
throw new Error(LINKING_ERROR);
}
});
function enableSecureView() {
return PreventScreenshotIosAndroid.enableSecureView();
}
function disableSecureView() {
return PreventScreenshotIosAndroid.disableSecureView();
}
function forbidAndroidShare() {
return PreventScreenshotIosAndroid.forbid();
}
function allowAndroidShare() {
return PreventScreenshotIosAndroid.allow();
}
//# sourceMappingURL=index.js.map
;