This is sample RN app which uses rn-sdk.
Apart from showing usage example of rn-sdk, it is also used to test release branch rn-sdk version.
We are maintaining separate branch for unbundled and bundled version
yarn install
NODE_OPTIONS=--max-old-space-size=8192 npm run start --reset-cache --verbose
./node_modules/.bin/react-native run-android
Testing needs to happen to for both bundled and unbundled branch
1. Sample app from unbundled version branch
- First unlink/remove older
@crxupay/rn-sdk
installed. - For safety
rm -rf node_modules/
andrm -rf package-lock.json
- Open package.json (remove @cruxpay/rn-sdk as we are going to install it from branch manually )
yarn install
yarn add https://github.com/cruxprotocol/rn-sdk#release/0.0.xxx
[]- On first tab run:
emulator -avd Pixel_3a_XL_API_29
- On second tab run:
NODE_OPTIONS=--max-old-space-size=8192 npm run start --reset-cache --verbose
- On third tab run:
./node_modules/.bin/react-native run-android
2. Sample app from bundled version branch
The steps 1-6 are same for bundled version too. After doing those follow these (which essentially are building the bundled form of the sdk).
cd node_modules/@cruxpay/rn-sdk
npm install
NODE_ENV=prod npm run build
cd ../../../
Again continue with step 7-9 as above