beast / react-native-isdevicerooted Goto Github PK
View Code? Open in Web Editor NEWCheck if a device is rooted or jailbroken. Also checks if the device is secured with fingerprint or passcode.
License: MIT License
Check if a device is rooted or jailbroken. Also checks if the device is secured with fingerprint or passcode.
License: MIT License
Hi, I'm unable to successfully compile for iOS using react-native run-ios
or via XCode 8.2.1.
/Users/me/dev/my_project/node_modules/react-native-is-device-rooted/ios/RNIsDeviceRooted.m:2:9: fatal error: 'UIDevice_PasscodeStatus.h' file not found
#import "UIDevice_PasscodeStatus.h"
^
1 error generated.
** BUILD FAILED **
The following build commands failed:
CompileC /Users/me/dev/my_project/ios/build/Build/Intermediates/RNIsDeviceRooted.build/Debug-iphonesimulator/RNIsDeviceRooted.build/Objects-normal/x86_64/RNIsDeviceRooted.o RNIsDeviceRooted.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
I went through the manual installation instructions for iOS and Android like so:
I followed all steps as described except for the Podfile changes. I suspect this might be the culprit. My Podfile is roughly as follows:
target <NAME_OF_MY_PROJECT> do
pod <some_dependency>
pod <another_dependency>
...
pod 'UIDevice-PasscodeStatus', '~> 0.0.2'
end
I've tried the following:
Rename the import in RNIsDeviceRooted.m
from #import "UIDevice-PasscodeStatus.h"
to #import "UIDevice_PasscodeStatus.h"
. I thought this was worth a shot because it showed up when clicking in XCode on Project Navigator
> MyProject
> Libraries
> RNIsDeviceRooted.xcodeproj
> Build Phases
> Link Binary with Libraries
> UIDevice_PasscodeStatus.framework
.
Run react-native link
No luck so far. I'm not so familiar with native iOS development, perhaps I'm missing something common.
Hi,
For the installation of this Library, ReadMe suggest in Step 4 to add header search paths for RNIsDeviceRooted.xcodeproj. Location suggest react-native-is-device-rooted/ios/Pods/Headers/Public/UIDevice-PasscodeStatus
which doesn't exist in node_modules or in Pods folder under {ReactNativeProject}/ios
directory. Can you please confirm where these changes needs to be done?
Click RNIsDeviceRooted.xcodeproj in the project navigator and go the Build Settings tab. Make sure 'All' is toggled on (instead of 'Basic'). Look for Header Search Paths and make sure it contains the following and all marked as recursive:
$(SRCROOT)/../../React
$(SRCROOT)/../../react-native/React
${SRCROOT}/../../react-native-is-device-rooted/ios/Pods/Headers/Public
${SRCROOT}/../../react-native-is-device-rooted/ios/Pods/Headers/Public/UIDevice-PasscodeStatus
I tried including the libRNIsDeviceRooted.a
in Build Phases -> Link Binary with Libraries but when I try to build my project it prompts me the error below. Any idea? Thank you.
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -lPods-RNIsDeviceRooted error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lPods-RNIsDeviceRooted is not an object file (not allowed in a
library)
I followed your installation instructions.
When I build my app I get following error:
/Users/usr/Projects/myapp/node_modules/react-native-is-device-rooted/ios/RNIsDeviceRooted.m:2:9: fatal error: 'UIDevice+PasscodeStatus.h' file not found
#import "UIDevice+PasscodeStatus.h"
What am I doing wrong?
PS. I'm a Javascript developer ;-)
Hello,
I tried to incorporate the module into my app. However, all the 3 root method checks could not detect root. The devices I did the tests on are Samsung Galaxy S5 running LineageOS 14.1 and OnePlus 3T stock Android 7. I found another method checking if the device executes the "su" commands. Succssfully detected root on these two devices, as well as detected no root status on an unrooted Huawei P9 Lite running Android 6 stock. The Java native method used is below. I can make a pull request if you'd like.
private static boolean canExecuteSu() {
boolean executedSuccesfully;
try {
Runtime.getRuntime().exec("su");
executedSuccesfully = true;
} catch (Exception e) {
executedSuccesfully = false;
}
return executedSuccesfully;
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.