Git Product home page Git Product logo

react-native-isdevicerooted's People

Contributors

beast avatar cheriejw avatar rajivshah3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

react-native-isdevicerooted's Issues

iOS: Unable to compile

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:

iOS:

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

Android: Works fine.

I've tried the following:

  1. 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.

  2. Run react-native link

No luck so far. I'm not so familiar with native iOS development, perhaps I'm missing something common.

where to Update the header search paths

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


Cannot link libRNIsDeviceRooted.a to react-native

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)

build fails UIDevice+PasscodeStatus.h

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 ;-)

Root check methods do not work on Android 7

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;
  }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.