Coder Social home page Coder Social logo

silo_app's Introduction

KONG SiLo

This app allows you to validate a SiLo -- or silicon locked smart contract -- via NFC using an iPhone or Android. Kong cash is an example of a SiLo. See the Kong whitepaper for more information on how SiLos work.

Setup

First, make sure you have the following dependencies:

brew install node
brew install watchman
brew tap AdoptOpenJDK/openjdk
brew cask install adoptopenjdk8
npm install -g react-native-cli

If you want to build for iOS, you will also need to install the Xcode Command Line Tools. Open Xcode, then choose "Preferences..." from the Xcode menu. Go to the Locations panel and install the tools by selecting the most recent version in the Command Line Tools dropdown.

Next, clone repo and run the following:

watchman watch-del-all
rm package-lock.json
rm -rf /tmp/metro-bundler-cache-*
rm -rf /tmp/haste-map-react-native-packager-*
rm -rf node_modules
npm install
./node_modules/.bin/rn-nodeify --hack --install
react-native link

If you're building for iOS then you also need to set up pods:

cd ios && pod install

Note that /tmp may be identified by $TMPDIR on some systems

Testing on iOS simulator

To run on ios, either start the simulator:

react-native run-ios

...or build to use on the device using xcodeproj in ./ios/ folder.

Testing on Android

To run on android with the device connected:

react-native run-android

or build using gradle; Go to ./android/ and run:

./gradleW assembleRelease

When running with a connected device, run:

adb logcat *:S ReactNative:V ReactNativeJS:V

...to get the log output of the app running on the device. This is extremely helpful to localize issues.

Notes

When updating packages, start out by running

npm outdated

Then try to update package by package, including a full rebuilt (see above) to make sure each updated package works.

You might also have to remove .git files in some of the submodules, e.g.:

rm -rf ./node_modules/react-native-udp/.git

On iOS you may need to enable legacy build phases:

https://freakycoder.com/react-native-notes-14-cycle-inside-exampletests-building-could-produce-unreliable-results-issue-5b7ff4dc89ad

In case of trouble with fonts.

https://medium.com/react-native-training/react-native-custom-fonts-ccc9aacf9e5e

See also:

react-native link react-native-vector-icons

Port forwarding for android server.

echo "
rdr pass inet proto tcp from any to any port 8081 -> 127.0.0.1 port 8081
" | sudo pfctl -ef -

silo_app's People

Contributors

balaah avatar

Stargazers

 avatar Roy Hodge Jr. avatar

Watchers

James Cloos avatar Cameron Robertson avatar  avatar

Forkers

royhodge

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.