Prerequisites

React Native (enable you to write android and ios native apps):

o Please follow the Facebook ‘getting started’ post, it is straightforward and clear

https://facebook.github.io/react-native/docs/getting-started.html

And also make sure that you have Node.js and NPM installed

https://nodejs.org/en/

o Also install the React Native CLI by running this command:

npm install –g react-native-cli

o Run this command to create your project:

react-native init <your-project-name>

o Navigate to your newly created project

cd <your-project-name>

Firebase (enable you to run a real-time database and receive push notifications):

o Create Firebase Account

o Then create a firebase Project by following this tutorial- https://rnfirebase.io/docs/v4.0.x/installation/initial-setup#Creating-a-new-project

o After you download your google-services.json file, place this file in the root of your project at ~ android/app/google-services.json. which includes your firebase credentials and configurations

o Open Your database in firebase and go to rules and copy and replace your firebase rules with:

{

"rules": {

"users": {

".read": true,

".write": "auth != null"

},

"bookings": {

".read": true,

".write": true

},

"messages": {

".read": true,

".write": true

},

".read": "auth != null",//allow reading of files

".write": "auth != null"

}

}

To release a signed app to publish on Google play follow this tutorial:

https://facebook.github.io/react-native/docs/signed-apk-android.html

Last updated