Skip to content

HSLdevcom/react-native-proto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-proto

Dev

  • See React Native getting started#installing-dependencies for prerequisites
  • Clone this repo and install deps yarn
  • Copy config-example.js -> config.js and add configs
  • To run iOS-version react-native run-ios or open XCode-project from ios-folder and run build
  • To run Android-version see Android-tab in getting-started-page
    • It's probably easier (and smoother) to run the app on real device than on virtual device
    • During development you will need do a port forwarding: adb reverse tcp:8081 tcp:8081
      • This will allow the app to access the React Packager server which serve the JS. The port 8081 is the default React Packager port.
    • You can list the existing forwards using adb reverse --list
    • If you have an error like Error:The SDK Build Tools revision (23.0.1) is too low for project ':react-native-xxx'. Minimum required is 25.0.0 you can
      • Replace those manually in react-native-xxx-package to 25.0.0 or
      • Open project for example in Android Studio, run Gradle sync and after that click Update Build Tools version and sync project

Tests

Special stuff

At the moment you need to edit node_modules/nfc-ndef-react-native/android/src/main/java/es/tiarg/nfcndefreactnative/NfcNdefReactNativeModule.java-file public static void setupForegroundDispatch-function and add if (adapter != null) to line 258

if (adapter != null) adapter.enableForegroundDispatch(activity, pendingIntent, null, null);

otherwise Android phone without NFC support will stop working. TODO: fixthis