UNPKG

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.

72 lines (71 loc) 2.14 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _reactNative = require("react-native"); const LINKING_ERROR = `The package 'react-native-safeguard' 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 Safeguard = _reactNative.NativeModules.Safeguard ? _reactNative.NativeModules.Safeguard : new Proxy({}, { get() { throw new Error(LINKING_ERROR); } }); var _default = exports.default = Safeguard; //# sourceMappingURL=index.js.mapsure: \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 Safeguard = _reactNative.NativeModules.Safeguard ? _reactNative.NativeModules.Safeguard : new Proxy({}, { get() { throw new Error(LINKING_ERROR); } }); function initialize(config = {}) { return Safeguard.initialize(config); } function checkAll() { return Safeguard.checkAll(); } function checkRoot() { return Safeguard.checkRoot(); } function checkDeveloperOptions() { return Safeguard.checkDeveloperOptions(); } function checkMalware() { return Safeguard.checkMalware(); } function checkNetwork() { return Safeguard.checkNetwork(); } function checkScreenMirroring() { return Safeguard.checkScreenMirroring(); } function checkApplicationSpoofing() { return Safeguard.checkApplicationSpoofing(); } function checkKeyLogger() { return Safeguard.checkKeyLogger(); } function getAndroidIntegrityToken() { if (_reactNative.Platform.OS === 'ios') { throw new Error('getAndroidIntegrityToken is not available on iOS'); } return Safeguard.getAndroidIntegrityToken(); } var _default = exports.default = { initialize, checkAll, checkRoot, checkDeveloperOptions, checkMalware, checkNetwork, checkScreenMirroring, checkApplicationSpoofing, checkKeyLogger, getAndroidIntegrityToken }; //# sourceMappingURL=index.js.map