1. Home
  2. Docs
  3. Ionic Food Delivery – Single
  4. FCF

FCF

Before doing firebase setup, we need to install firebase tools on your machine. To do that, please execute

npm install -g firebase-tools

Step 1: Create new folder & login to firebase

mkdir fcf
cd fcf
firebase login
firebase init functions

It might ask your few questions, please answer as followed

– Choose your firebase project
– Language: JavaScript
– EsLint: No
– Npm install: Yes

Step 2:

Once it’s project is created, please follow this

cd functions

Step 3: Update files

  • Download and copy file into fcf/functions/
  • Update your credentials inside cloud-function/index.js and copy to fcf/functions/index.js

Step 5:

cd ..
firebase deploy --only functions

Note: You must be inside fcf/ (not inside fcf/functions) folder for deploying.

Push setup

To set up firebase push notification, you can follow the below steps.

 

Steps:

  1. Navigate to firebase console
  2. Click Add App then choose android (steps are same for iOS)
  3. Fill All required details.
    1. App Name => Your App Name
    2. Package Name => com.yourcomanyname.appname => it should be the same inside config.xml
    3. SHA 1 key: https://developers.google.com/android/guides/client-auth
  4. Download google-service.json (for iOS download GoogleService-info.plist)
  5. Then copy your downloaded files & paste inside your project folder (not anywhere else)