This guide walks you through Flutter Firebase Setup for Android and IOS in 2025, using manual method. Without using the FlutterFire CLI.
What you’ll get by the end
- Firebase project created and connected
google-services.json(Android) andGoogleService-Info.plist(iOS) correctly placed- Gradle and CocoaPods configured
- A verified run using
firebase_core
Then, we have to follow the step-by-step process to connect Firebase to the Flutter app. Once your Flutter project is ready, we will start setting up Firebase.
Create a Firebase project.
- Go to the Firebase Console.
- Click Add project → give it a name.
- (Optional) Enable Analytics.
- Once created, open the new project.
Firebase Setup for Android
- In Firebase Console, open Project settings → Your apps → Add app → Android.
- Enter:
- Android package name → must match
applicationIdinandroid/app/build.gradle(e.g.,com.example.firebase_setup_demo). - (Optional) App nickname & SHA-1 key (required for Phone Auth, Google Sign-In).
- Android package name → must match
- Download the
google-services.json file. - Place it into:
android/app/google-services.json
Update Gradle files
Project-level android/build.gradle.kts:
// add this plugin on the top of your build.gradle.kts files
plugins{
id ("com. google gms google-services") version "4,4.2" apply
}
App-level android/app/build.gradle.kts
plugins {
id 'com.android.application'
id 'com.google.gms.google-services' // <- add this
}
android {
defaultConfig {
minSdkVersion 23
}
}
Add the latest ndkVersion
ndkVersion = "27.0.12077973"
Firebase setup for IOS
- In Firebase Console, Add app → iOS.
- Enter:
- iOS bundle ID → must match the
PRODUCT_BUNDLE_IDENTIFIERin Xcode (Runnertarget → Signing & Capabilities → Bundle Identifier). - (Optional) App nickname & App Store ID.
- iOS bundle ID → must match the
- Download the
GoogleService-Info.plist file. - On the other hand, Open the
iosfolder in Xcode and dragGoogleService-Info.plistinto the Runner project (make sure “Copy items if needed” is checked and it’s added to the correct target). - Imoort firebase core and add configuration on AppDelegate.swift.
import Flutter
import UIKit
import FirebaseCore // add this
@main
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
FirebaseApp.configure()
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
Update Podfile
In ios/Podfile:
platform :ios, '15.0' (atlist 13 is required)
Install pods if not already installed:
cd ios pod install cd ..
Finally, both and android and ios setup is completed.
Add Firebase packages
In your project root, run
flutter pub add firebase_core # Add more as needed (only for required case) flutter pub add firebase_auth cloud_firestore
Run:
flutter pub get
Initialize Firebase in Dart
Edit lib/main.dart:
import 'package:flutter/material.dart';
import 'package:firebase_core/firebase_core.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(); // Manual setup uses platform config files
runApp(const MyApp());
}
Overall, Everyting is completed for Flutter Firebase Setup for Android and IOS. Run the app on both the device.
Common issues
- Android: No matching client found → Ensure
google-services.jsonis insideandroid/app/. - iOS: Plist not found → Ensure
GoogleService-Info.plistis insideRunnertarget in Xcode. - minSdkVersion issue → Set
minSdkVersion 23inandroid/app/build.gradle. - Pod errors → Run
pod repo update && pod installinsideios/.
Also learn stripe payemnt integration in flutter.







[…] push notifications. Additionally, if you have faced any problem to setup the Firebase, read this blog article and watch this […]
[…] Before writing any code, create a new Flutter project or continue with an existing project with the latest update of Flutter, and integrate Firebase with the Flutter project. […]