$ npm install react-native-isrooted --save
Android
For React Native version >= 0.60.0 will be autolinked
iOS
you need to run, cd ios/ && pod install && cd ..
For React Native version < 0.60.0
$ react-native link react-native-isrooted
import DeviceStatus from 'react-native-isrooted';
async componentDidMount(){
console.log(await DeviceStatus.isRooted());
}
or
componentDidMount(){
const isRooted = DeviceStatus.isRooted(status => status));
}
Thank you all who helped to compile this amazing library.
- Yang @beast
- Erandi Hasithanjali @era21