Skip to content

firebase setup firebase

devonfw-core edited this page Dec 27, 2022 · 3 revisions

Setting up an environment on Firebase

By the end of this guide, an environment on Firebase will be created on an existing Google Cloud project in an automated way using a script.

Prerequisites

  • Have a Google Cloud project already setup and GCloud CLI installed and configured. If it is not the case, please go back to corresponding guide.

  • If this is your first time using Firebase you need to manually accept the Firebase terms and conditions. To do so, please access the console and create your first project, marking both checkboxes regarding Firebase conditions (Google Analytics is not necessary). After that you can delete it, and proceed to use the script.

Setting up Firebase services using the provided script

The script located at /scripts/accounts/gcloud/setup-firebase.sh allows you to:

  1. Create a Firebase project with an ANDROID, IOS and WEB aplication.

  2. Enable and setup Firestore.

  3. Enable Geocoding API key.

  4. Enable Maps SDK for ANDROID.

  5. Enable Maps SDK for IOS.

  6. Enable Map Static API.

Usage

setup-firebase.sh \
    -n <project name> \
    -o <local directory> \
    [-r <firebase region>] \
    [--enable-maps] \
    [--setup-ios] \
    [--setup-android] \
    [--setup-web] \
=== Flags
-n                   [Required] Name of the project.
-o, --output         [Required] Output path to store credentials.
-r                   [Required] Region where to create Firestore Database.
--enable-maps                   Enables APIs related to Maps services.
--setup-ios                     Enables IOS APIs and creates IOS App.
--setup-android                 Enables Android APIs and creates Android App.
--setup-web                     Enables Web APIs and creates Web App.
=== Typical use cases
Tip
This is non-exhaustive list. Make your own combination of flags if all of the following use cases does not fit your needs.

Creating a project and enable Maps SDK

./setup-firebase.sh -n  -o ./output -r europe-west2 --enable-maps

Creating a project with ANDROID, IOS and WEB applications

./setup-firebase.sh -n  -o ./output -r europe-west2 --setup-android --setup-ios --setup-web

Guides per provider

Clone this wiki locally