/coopcycle-app

CoopCycle native app

Primary LanguageJavaScriptMIT LicenseMIT

CoopCycle

Build Status

Build Status

Prerequisites

Install Node, Watchman & React Native CLI as described here.

Install dependencies to compile node-canvas depending on your OS.

Setup - All Platforms

Install dependencies with Yarn.

$ yarn install

Populate your local .env file:

$ cp .env.dist .env

Set up Firebase

Setup - Android

Get a Google Maps API Key

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

  • Create a gradle.properties file in GRADLE_USER_HOME (defaults to ~/.gradle)

Learn more about configuring Gradle Build Environment

googleMapsApiKey=YOUR_API_KEY

Setup - iOS

iOS development requires macOS and CocoaPods.

$ sudo gem install -n /usr/local/bin cocoapods
$ cd ios && pod install

Testing

yarn test

Troubleshooting

« Have you tried turning it off and on again? »

watchman watch-del-all
rm -rf $TMPDIR/react-*
rm -rf $TMPDIR/haste-map-react-native-packager-*
rm -rf ~/.rncache
rm -rf node_modules
rm yarn.lock
yarn cache clean
yarn install