jail-monkey/jailmonkey.js
Danthony Pabon 3d5c7eebcb Improvement in general
*The existing code was improved to return promises every time it is called
*Added the function to know if the device has activated the development function
*Other improvement in general

//New  use way  
async componentDidMount() {
 // Check if device has development settings enabled
  let Dev = await JailMonkey.isDevelopmentSettingsMode()
  console.log(Dev) // true or false 
}
2019-07-25 10:13:12 -04:00

19 lines
604 B
JavaScript

import { NativeModules } from "react-native";
const { JailMonkey } = NativeModules;
export default {
isJailBroken: () => JailMonkey.isJailBroken,
hookDetected: () => JailMonkey.hookDetected,
canMockLocation: () => JailMonkey.canMockLocation,
trustFall: () => JailMonkey.isJailBroken || JailMonkey.canMockLocation,
isOnExternalStorage: () => JailMonkey.isOnExternalStorage,
isDebuggedMode: function() {
return JailMonkey.isDebuggedMode();
},
isDevelopmentSettingsMode: function() {
return JailMonkey.isDevelopmentSettingsMode();
},
AdbEnabled: () => JailMonkey.AdbEnabled
};