Firebase setup
Firebase, developed by Google, is a comprehensive platform for building app infrastructure, enhancing app quality, and growing your business.
This guide will walk you through the basic steps to configure Firebase for both Android and iOS. Once set up, your app will benefit for free, these features:
Google Login
Phone Number Login
Push Notifications with (Firebase cloud messaging - FCM)
Firebase Crashlytics
Google Analytics
Firebase Monitoring
Google Places (For Nearby Location)
Step 1: Configure Firebase
Step 1.1: Create Project in Firebase Console
Click on “Add project” and follow the instructions to create a new Firebase project.
Step 1.2: Add Firebase to Your iOS App
Open your Firebase project console.
Click the gear icon in the upper left corner and select Project settings.
In the Your apps section, select the iOS icon.
Fill in the information:
iOS Bundle ID: Use the bundle ID from your application. Ensure it's in reverse domain format (e.g., if your domain is example.com, the bundle ID should be
com.example.app
). Use only lowercase letters.App nickname: This is only for distinguishing between applications on Firebase, so set it arbitrarily.
App Store ID: This parameter can be omitted.
Click Register app.
Download the
GoogleService-Info.plist
file and save it for later use.Click Next.
Click Skip this step.
Complete the process of creating an iOS application on Firebase.
Step 1.3: Add Firebase to Your Android App
Open your Firebase project console.
Click the gear icon in the upper left corner and select Project settings.
In the Your apps section, select the Android icon.
Fill in the information:
Android package name: Use the package name from your application. Ensure it's in reverse domain format (e.g., if your domain is example.com, the package name should be
com.example.app
). Use only lowercase letters.
Click Register app (you can omit the Debug signing certificate SHA-1 parameter).
Download the
google-services.json
file and save it for later use.Click Next.
Since your project setup is already complete, click Next to skip adding the Firebase SDK.
If Firebase does not detect your test device, click Skip this step to continue. If detected, click Continue to console.
Complete the process of creating an Android application on Firebase.
Step 2: Set Up Authentication
This Step is opcional, complete it only if you want to Enable Google Login or Phone Login. You can skip them or one of them if you don't pretend to use it.
Step 2.1: Enable Phone Login
In the Firebase console, go to Authentication.
Click on the Sign-in method tab.
Enable Phone as a sign-in provider.
Save your changes.
Step 2.2: Enable Google Login
In the Firebase console, go to Authentication.
Click on the Sign-in method tab.
Enable Google as a sign-in provider.
You will be prompted to choose the Email and Project name
Save your changes.
Make sure that at the end of this progress, you have downloaded and saved for later use 2 files:
google-services.json
GoogleService-Info.plist