*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
}
19 lines
604 B
JavaScript
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
|
|
};
|