Install Node, Java Development Kit, Watchman & React Native CLI as described here.
You can install react-native-cli
with following command:
npm install –g react-native-cli
Or you can use npx
which ships with Node.js instead of installing React Native CLI.
With npx react-native <command>
, the current stable version of the CLI will be downloaded and executed at the time the command is run.
Install dependencies to compile node-canvas depending on your OS.
Create a Firebase account.
Follow the Firebase instructions to download and copy google-services.json
to the android/app
folder.
Follow the Firebase instructions to download and copy GoogleService-Info.plist
to the ios/
folder.
Install dependencies with Yarn.
$ yarn install
Populate your local .env
file:
$ cp .env.dist .env
To launch an Android emulator on Linux, you will need to enable acceleration.
You can run the app on your Android device following these instructions.
A Google Maps API Key is needed at compilation time for Android (see AndroidManifest.xml
).
To get an API key follow the instructions Get API key
Make sure that you have Maps SDK for Android
API enabled in your Google Cloud Platform Console
Add your API key to .env
GOOGLE_MAPS_BROWSER_KEY=YOUR_API_KEY
GOOGLE_MAPS_ANDROID_KEY=YOUR_API_KEY
Those keys won't work for address autocomplete if you don't have billing enabled in Google Cloud. Before enabling billing in your project, read and check the the terms and conditions for the free trial.
iOS development requires macOS and CocoaPods.
$ bundle install
$ cd ios && USE_FRAMEWORKS=static NO_FLIPPER=1 bundle exec pod install
yarn start
yarn android
yarn ios
npx react-native start
npx react-native android
For iOS replace android
with ios
.
yarn test
Setup: https://wix.github.io/Detox/docs/introduction/environment-setup
Build the app and run tests:
Android:
detox build -c android.emu.debug
detox test -c android.emu.debug
iOS:
detox build -c ios.sim.debug
detox test -c ios.sim.debug
Make sure that you have emulators set up as specified in .detoxrc.js
> devices
or use --device-name
parameter while running tests. For example: detox test -c android.emu.debug --device-name="Pixel_8_API_34"
« Have you tried turning it off and on again? »
watchman watch-del-all
rm -rf $TMPDIR/react-*
rm -rf $TMPDIR/metro-*
rm -rf ~/.rncache
rm -rf node_modules
rm yarn.lock
yarn cache clean
yarn install