> For the complete documentation index, see [llms.txt](https://azul-mouad.gitbook.io/goldtv-iptv-documments/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://azul-mouad.gitbook.io/goldtv-iptv-documments/firebase/firebase-flutter-project.md).

# Firebase Flutter Project

#### &#x20;Create a New Firebase Project

1. Go to the [Firebase Console](https://console.firebase.google.com/).
2. Click **Add Project** and follow the steps to create a new project.\
   Example: Name the project `GoldTvApp`.

<figure><img src="https://2092128983-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtcHWM7dAtXaNrlqZkrQ0%2Fuploads%2F448L1GvcVRXyOi7oqHuu%2Ffirebase%201.jpg?alt=media&amp;token=5e3e4877-ccb7-4348-99ed-3b6f9315d5ed" alt=""><figcaption></figcaption></figure>

Give your project name and click continue.

<figure><img src="https://2092128983-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtcHWM7dAtXaNrlqZkrQ0%2Fuploads%2FzYm1vQZCJnKfBwtwUIUG%2Ffirebase%202.jpg?alt=media&amp;token=b1fb2430-a691-4b1a-9326-7424b0485b23" alt=""><figcaption></figcaption></figure>

#### Step 4: Add Firebase to Your Flutter App

1. Copy the Flutter command provided by Firebase during project setup. Example command:

   ```bash
   flutterfire configure --project=rixos-play
   ```
2. Run the command in your app's root directory. This will generate the required Firebase configuration files (`google-services.json` for Android and `GoogleService-Info.plist` for iOS).
3. Pick Android and iOS platforms during the configuration process.

Step 1: Add New Project Platform

<figure><img src="https://2092128983-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtcHWM7dAtXaNrlqZkrQ0%2Fuploads%2F1r6hso5XNqm1nB1P4knm%2Ffirebase%203.jpg?alt=media&amp;token=3212ef15-b707-4864-9e4f-53011bf45b7f" alt=""><figcaption></figcaption></figure>

Step2: Click Flutter

<figure><img src="https://2092128983-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtcHWM7dAtXaNrlqZkrQ0%2Fuploads%2FDrMvhQeNxw3JNgzXKMId%2Ffirebase%204.jpg?alt=media&amp;token=3608bb52-ca3f-4bc3-960a-63a72c0bbc17" alt=""><figcaption></figcaption></figure>

Step 3: Copy both commands to your terminal project

<figure><img src="https://2092128983-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtcHWM7dAtXaNrlqZkrQ0%2Fuploads%2FapfRGdSthNnPcRU6uwX0%2Ffirebase%205.jpg?alt=media&amp;token=e17aa2be-fc66-40de-83d4-76b8c1e85771" alt=""><figcaption></figcaption></figure>

#### Step 5: Enable Cloud Firestore

1. In the Firebase Console, go to **Build** > **Firestore Database**.
2. Click **Create Database**, choose a location, and set it to start in test mode.\
   Test mode automatically enables read and write permissions:

   ```json
   rules_version = '2';

   service cloud.firestore {
     match /databases/{database}/documents {
       match /{document=**} {
         allow read, write: if true;
       }
     }
   }
   ```
3. Publish the rules.

<figure><img src="https://2092128983-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtcHWM7dAtXaNrlqZkrQ0%2Fuploads%2FFdBO4kkSY60Dpvy2kBKB%2FXnip2024-11-29_14-28-53.jpg?alt=media&amp;token=279bdb36-909a-45d4-8e65-d0e90d270faa" alt=""><figcaption></figcaption></figure>

***
