UniversalLoginRNStarter
React Native Starter App for UniversalLoginSDK.
Requirements
- NodeJS v10.12.0
- Yarn 1.10.1
This starter has been tested only on OS X.
Dependencies
This starter uses react-native-navigation
(v1) for navigation.
rn-nodeify
package allows to use node core modules. Learn more.
Native libs for secure and fast crypto:
react-native-secure-randombytes
react-native-fast-crypto
Deployment
Setup Relayer Server and Testnet Node
Run Relayer Server and Testnet Node in separate terminal window by following the instructions to run example - https://github.com/UniversalLogin/UniversalLoginSDK
RN App
New to React Native? Here's a helpful introduction: https://facebook.github.io/react-native/docs/getting-started.html
iOS
- Clone the GitHub repository to your machine.
- Run
yarn
to get all of the packages required. (Ignore universal-login-monorepo errors) - Run
yarn build
script. - Run
npm run start --reset-cache
to start the bundler. - Open ios directory in Xcode.
- Run the project by clicking the play button.
Android
- Clone the GitHub repository to your machine.
- Run
yarn
to get all of the packages required. (Ignore universal-login-monorepo errors) - Run
yarn build
script. - Run
npm run start --reset-cache
to start the bundler. - Open android directory on Android Studio.
- Run the project by clicking the play button.
Please note
After each yarn
you also need to run yarn build
, which makes the following hacks:
- node_modules/universal-login-monorepo/universal-login-contracts directory is copied to node_modules/. (As UniversalLoginsSDK is a monorepo and
universal-loigin-sdk
has dependency onuniversal-loigin-contracts
). - Hacks from
rn-nodeify
package for crypto dependencies.
Hacking
Run example and create an identity by following instructions - tutorial.
After that, you can deploy and connect the app to identity contract.
Basically, this react-native starter mimics the universal-login-boilerplate
functionality.
License
UniversalLoginRNStarter is released under the MIT License.