Firebase Setup

React Native 6 min min read Updated: Aug 03, 2026 Beginner
Firebase Setup
Beginner Topic 1 of 18

Firebase Setup

Firebase provides a comprehensive suite of backend services for React Native applications, including authentication, databases, storage, and analytics. This tutorial covers the initial setup process.

Creating a Firebase Project

Start by creating a new project in the Firebase Console, which will generate the configuration needed to connect your React Native app to Firebase services.

Installing React Native Firebase

bash npm install @react-native-firebase/app

Configuring Android

Download the google-services.json file from the Firebase Console and place it in your android/app directory, then apply the Google services plugin in your build.gradle files.

javascript // android/build.gradle classpath 'com.google.gms:google-services:4.4.0' // android/app/build.gradle apply plugin: 'com.google.gms.google-services'

Configuring iOS

Download the GoogleService-Info.plist file from the Firebase Console and add it to your Xcode project, ensuring it is included in your app target.

bash cd ios && pod install

Verifying the Setup

javascript import firebase from '@react-native-firebase/app'; console.log('Firebase apps:', firebase.apps.length);

Installing Additional Firebase Modules

Each Firebase service, such as authentication or Firestore, requires installing its corresponding module separately, allowing you to include only the services your app actually needs.

bash npm install @react-native-firebase/auth @react-native-firebase/firestore

Conclusion

Properly configuring Firebase for both Android and iOS is the essential first step before integrating any of Firebase’s powerful backend services into your React Native application.

Get Newsletter

Subscibe to our newsletter and we will notify you about the newest updates on Edugators