Skip to content

Project Setup

Wathsara Wishwantha Daluwatta edited this page Aug 21, 2019 · 1 revision

First make sure to install react-native-cli.Follow the link below for details

Install React Native

Fork the original repository and use your own branch for your developments. https://github.com//AnimalRescue.git

Install npm packages run npm install

Configure firebase Make a copy of firebaseConfig.exaple.js which is in app/config and rename it to firebaseConfig.js. Then copy your credentials and paste it.

var firebaseConfig = { apiKey: "your credentials", authDomain: "your credentials", databaseURL: "your credentials", projectId: "your credentials", storageBucket: "your credentials", messagingSenderId: "your credentials", appId: "your credentials" };

Google & Facebook Sign In Configuration

Google

follow the given link with correct steps.

Config Google Sign-In

Note : Once you follow the above link, you'll find a way to get the web-client id for the application. Copy it and paste it in the firebaseConfig.js file under export const webClinetID = "your google web client id"

Make sure to include every files (google-service.json, your-key.keystore) in the project for getting working model of google sign in.

Facebook

First You should have a facebook acoount and an app id. Follow the link below to obatai the app id

Obtain Facebook App Id

Once you get the facebook app id, copy and paste it in the following location

/android/app/src/main/res/values/strings.xml <string name="facebook_app_id">your app id</string>

Once you've done with those processes, make sure to enable google sign in and facebook sign in methods in firebase.

Google Map Configuration FIrst you should obtain a google map api key. Follow the link to get the map api key. Map Api Key Once you get the map api key, copy and paste in the following files.

/android/app/main/src/AndroidManifest.xml android:name="com.google.android.geo.API_KEY" android:value="Your api key goes here"/>

app/components/SearchAndFixLocation/searchView.js

query={{ key: 'Your api key goes here', language: 'en', }}

You've now done with configurations 💯.

Run the project

react-native run-android

Enjoy coding 👍

Clone this wiki locally