Before starting work on repository please configure environment and emulators. You can find complete instruction here.
In TestProject
folder you can find demo application. React Native provides not the best developer experience so please follow the steps.
- Run
yarn install
in the project root. - Go to the
TestProject
folder and runyarn install
here. - Go back to project root, and run
yarn build
. - After build is done, run
sync.sh
to copy references of the library into the Test project. - Go to
TestProject
folder. - Set environment variable
PUBLIC_API_KEY
, you can just use.env
approach. - Run
yarn start
. From this moment it will keep your terminal.
- Run emulator in Android Studio or connect your device. You can check connected devices with
/android/sdk/platform-tools/adb devices
command. - Run
yarn android
fromTestProject
folder. - You should see the running app in emulator or device.
- Run
pod install
inTestProject/ios
folder. - Run
yarn ios
fromTestProject
folder. You may need to runpod install --repo-update
if you face errors. - You should see the running app in a simulator.
- Try
yarn start --reset-cache
. - Try relaunch emulator/simulator or reconnect your device.
- Try to delete both
node_modules
and install dependencies again in order from common steps.
React native instruments don't support npm
/yarn
links for packages, because of this each library update needs not only building this library but reinstalling module for demo app. Current repository have 2 ways to make development more comfortable.
- Change
"main"
section in library'spackage.json
to"./src/index.ts"
. With this fix you don't need to build library for getting updates inTestApp
, but don't forget to revert this change. - Run
sync.sh
script, it will syncsrc
,build
,ios
andandroid
folder between library and library copy in TestAppnode_modules
folder.