react-native-safeguard
Version:
A comprehensive security library for React Native applications that helps protect against various security threats including root detection, malware, tampering, and more.
51 lines (50 loc) • 1.39 kB
JavaScript
;
import { NativeModules, Platform } from 'react-native';
const LINKING_ERROR = `The package 'react-native-safeguard' doesn't seem to be linked. Make sure: \n\n` + 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 Safeguard = NativeModules.Safeguard ? NativeModules.Safeguard : new Proxy({}, {
get() {
throw new Error(LINKING_ERROR);
}
});
export function initialize(config = {}) {
return Safeguard.initialize(config);
}
export function checkAll() {
return Safeguard.checkAll();
}
export function checkRoot() {
return Safeguard.checkRoot();
}
export function checkDeveloperOptions() {
return Safeguard.checkDeveloperOptions();
}
export function checkMalware() {
return Safeguard.checkMalware();
}
export function checkNetwork() {
return Safeguard.checkNetwork();
}
export function checkScreenMirroring() {
return Safeguard.checkScreenMirroring();
}
export function checkApplicationSpoofing() {
return Safeguard.checkApplicationSpoofing();
}
export function checkKeyLogger() {
return Safeguard.checkKeyLogger();
}
export default {
initialize,
checkAll,
checkRoot,
checkDeveloperOptions,
checkMalware,
checkNetwork,
checkScreenMirroring,
checkApplicationSpoofing,
checkKeyLogger
};
//# sourceMappingURL=index.js.map