- This repository is not used for the Alpha release and hence no code should be committed to this repo except the docs themselves
- Please refer to https://github.com/cyber-republic/react-native-elastos-carrier for Elastos Carrier
- Please refer to https://github.com/cyber-republic/react-native-elastos-wallet-core for Elastos Wallet + DID
Parallel to the Trinity Browser, this is the Elastos DApp framework implementation on React Native.
$ npm i
$ react-native link
$ npm run dep:start
There are 2 demo DApp files in /dapp
folder.
$ npm run build:dapp -- --name test
to build test dapp.- Move all of
/build/ios
files to/remote
folder.
- Go to
/ios
folder. - Run
$ pod install
. - Open
/ios/ELASTOS_RN_FRAMEWORK.xcworkspace
with XCode. - Check your local IP address with
$ ifconfig
. - Change
DAPP_SERVER_URL
under/src/config/index.js
to your local IP address. Default port is 3000 by docker instance setting.
- Read process workflow
- Create a new github issue for every code change that is required - bug, feature, enhancement, etc. Also use appropriate label and attach the milestone to go along with it
- Create a new branch to work on the above github issue
- Make your change and push to your branch and then submit a PR to be merged into master if everything looks right
- Make a note of this commit on the github issue
- Close the github issue
- Repeat this process for every single code change you decide to do. This is to ensure maximum transparency and also to make it easier to keep track of what everyone is working on. This way, two people are not working on the same thing. We also need github issues that will be used in conjunction with the amount of contribution you make along with the time spent in order to pay out your ELA rewards every 2 weeks
Elastos React Native Framework requires certain package to be installed and configured to operate. If you're starting out for the first time, please follow these steps to help you get started.
- Required: XCode 9.4 or newer, Command Line Tools, CocoPods, Homebrew, Docker, Node, Watchman, React Native Client.
-
Download and install XCode from the Apple App Store.
-
Install Command Line Tools. Open Terminal, type (copy and paste) the following and press enter:
xcode-select --install
- Install CocoPods. In Terminal, type (copy and paste) the following and press enter:
sudo gem install cocoapods
- Install Homebrew. In Terminal, type (copy and paste) the following and press enter:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
5a. Install Docker. Open your web browser and go to the URL:
https://store.docker.com/editions/community/docker-ce-desktop-mac
5b. Create an account on to login to the website, download and follow the installation instructions on the download website. Once you have completed installation, login and run it.
- Install Node. In Terminal, type (copy and paste) the following and press enter:
brew install node
- Install Watchman, a tool by Facebook for watching changes in the filesystem. In Terminal, type (copy and paste) the following and press enter:
brew install watchman
- Install React Native Client. In Terminal, type (copy and paste) the following and press enter:
npm install -g react-native-cli
- On the XCode menu, click on Source Control and select Clone.. from the dropdown menu.
10a. Enter the repository URL:
https://github.com/cyber-republic/elastos-ReactNative-framework.git
10b. Click the Clone button and select the destination you want to clone the Elastos React Native Framework to and click the Clone button.
- In Terminal, change your working directory to the location you cloned the Elastos React Native Framework.
12a. Setup the environment with NativeBase by typing (copy and paste) the following into Terminal and pressing enter:
npm i
12b. If you need, follow the instructions by typing (copy and paste), npm audit fix, into Terminal to fix any issues.
- Lets link this to React Native by typing (copy and paste) the following into Terminal and press enter:
react-native link
- We need to locate your systems IP address so in Terminal type (copy and paste) the following and press enter to locate it:
ifconfig
15a. Open the /elastos-ReactNative-framework/src/config/src/config/index.js file in Finder by right clicking and selecting open with TextEdit.
15b. Change the DAPP_SERVER_URL to your local IP address, save and close the file.
- Run the local docker instance. In Terminal, type (copy and paste) the following and press enter:
npm run dep:start
- Install CocoPods. In Terminal, change your working directory to /elastos-ReactNative-framework/ios. Type (copy and paste) the following and press enter:
pod install
- Open /elastos-ReactNative-framework/ios/ELASTOS_RN_FRAMEWORK.xcworkspace with XCode. Build and Run.