All Projects → coopcycle → coopcycle-app

coopcycle / coopcycle-app

Licence: MIT License
CoopCycle native app

Programming Languages

javascript
184084 projects - #8 most used programming language
swift
15916 projects
java
68154 projects - #9 most used programming language
objective c
16641 projects - #2 most used programming language
ruby
36898 projects - #4 most used programming language
Starlark
911 projects

CoopCycle

Build Status

Prerequisites

  • 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.

Setup - Firebase

Create a Firebase account.

Android

Follow the Firebase instructions to download and copy google-services.json to the android/app folder.

iOS

Follow the Firebase instructions to download and copy GoogleService-Info.plist to the ios/ folder.

Setup - All Platforms

Install dependencies with Yarn.

$ yarn install

Populate your local .env file:

$ cp .env.dist .env

Setup - Linux

  • 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.

    • You can display and control your Android device connected via USB with scrcpy.

Setup - Android

Get a Google Maps API Key

A Google Maps API Key is needed at compilation time for Android (see AndroidManifest.xml).

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.

Setup - iOS

iOS development requires macOS and CocoaPods.

$ sudo gem install -n /usr/local/bin cocoapods
$ gem install cocoapods-user-defined-build-types
$ cd ios && pod install

Running App

With React Native CLI
    yarn android
With Npx
    npx react-native start
    npx react-native android

For iOS replace android with ios.

Testing

yarn test

Troubleshooting

« 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
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].