Skip to content

ShelterApp/shelter-app

Repository files navigation

shelter-app

Shield: CC BY 4.0

This work is licensed under a Creative Commons Attribution 4.0 International License.

CC BY 4.0

Looking the place with shelter on Android and iOS devices.

Development

To set up your local development environment refer to the official doc: https://facebook.github.io/react-native/docs/getting-started

This app is built with React Native version 0.59.9.

Environment Variables

There are two files .env.production and .env.development

See .env.development for development defaults.

Variable Notes
NODE_ENV Set this to env for development
API_URL Set this to dev.xxx.xxx for development
LANG_NAME Set this to language name of the app
COOKIE_APP Set this to cookie name of the app
GOOGLE_MAPS_APIKEY Set key display map

Replace google-services.json, GoogleService-Info.plist from firebase your project.

Replace Facebook app ID in android/src/main/res/values/strings.xml

Replace Google API key in android/src/main/res/AndroidManifest.xml in line 36

Prerequisites

  • NodeJS, version 10.16.3 (LTS) or better. (I use nvm to manage Node versions — brew install nvm.)

  • react-native-cli (version 0.59.9, not 0.60.x)

    yarn global add react-native-cli@0.59.10

Installing dependencies

yarn

Creating new .env file with the same root src and copy the content in file .env.development if you want to run the app with development environment.

Running Tests

yarn test

Running Linter

yarn lint

Run Metro Builder

yarn start

Run the app

Make sure you have Xcode and Android studio installed with appropriate SDK

####Test Users #####Staging:

Comming soon

Run in Android Studio

Ref: facebook.github.io/react-native/docs/getting-started#1-install-android-studio

yarn android

Run in the iOS Simulator

Ref: facebook.github.io/react-native/docs/getting-started#xcode

yarn ios

TROUBLESHOOTING NOTE

If you are having trouble bundling the app for the first time on ios

yarn clean-ios

This will nuke your build folders and node_modules and reinstall everything from scratch.

Devices

The Android emulator and iOS simulator are great for testing however features should be tested on physical devices prior to issuing a merge request.

Someone to add instructions for deploying to actual devices

Redux dev tools

Add details of how to access the app from within Chrome

To view the state in the app install the Redux dev tools Chrome plugin.

Contributing

Please see the contributing notes.

update with link bellow: 1.react-native-fbsdk facebookarchive/react-native-fbsdk#493