- 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.
- This will allow the app to access the React Packager server which serve the JS. The 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 to25.0.0
or - Open project for example in Android Studio, run Gradle sync and after that click
Update Build Tools version and sync project
- Replace those manually in
- See for example: https://facebook.github.io/jest/docs/tutorial-react-native.html
npm run test
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