UNPKG

react-native-detect-frida

Version:

A React-Native library to detect if frida server is running or not

27 lines (26 loc) 880 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isDeviceRooted = isDeviceRooted; var _reactNative = require("react-native"); const LINKING_ERROR = `The package 'react-native-detect-frida' 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 DetectFrida = _reactNative.NativeModules.DetectFrida ? _reactNative.NativeModules.DetectFrida : new Proxy({}, { get() { throw new Error(LINKING_ERROR); } }); const isAndroid = () => { return _reactNative.Platform.OS === 'android'; }; function isDeviceRooted() { if (isAndroid()) { return DetectFrida.detectRoot(); } else { return DetectFrida.isJailBroken(); } } //# sourceMappingURL=index.js.map