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.4" 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() // add this
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
Update Podfile
In ios/Podfile:
platform :ios, '16.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/.
Podfiele
platform :ios, '16.0'
# Disable analytics to speed up builds (optional)
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
def flutter_root
generated_xcode_build_settings_path = File.expand_path(
File.join('..', 'Flutter', 'Generated.xcconfig'),
__FILE__
)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. Run flutter pub get first."
end
File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found"
end
require File.expand_path(
File.join('packages', 'flutter_tools', 'bin', 'podhelper'),
flutter_root
)
flutter_ios_podfile_setup
target 'Runner' do
use_frameworks! :linkage => :static
use_modular_headers!
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths
end
end
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end
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. […]
[…] the Flutter app to Firebase for both Android and iOS. I’ve already created a YouTube video and a blog article( Firebase setup for Android and IOS) that explains this setup step-by-step. If you face any issues, please check out the video or read […]
Gonna check out SBOBET Sportsbook. Need a good place to put down some bets. Hope the odds are good! Time to win big maybe! Click here: sbobetsportsbook