Speed up Firebase Firestore on iOS

Flutter tips Published on

When you're building Flutter apps with Firebase Firestore, you might notice that it takes a long time to compile on iOS, especially when you run your app from scratch. This can really slow down your development process.

Good News!

The good news is that there's a straightforward solution provided by Invertase.

The Fix

To speed things up, you need to make a small change in your iOS project files.

Open the Podfile

Go to the ios folder in your Flutter project and open the Podfile file. This file manages the native libraries your iOS app uses.

Add a Special Pod

Inside the section for your app's target (usually named 'Runner'), add the following line:

  ...
  target 'Runner' do
    use_frameworks!
    use_modular_headers!
    # ADD THIS
    pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '11.2.0'
  end
  ...
Important: Match the Version

The :tag => '11.2.0' part is crucial. You must change 11.2.0 to match the exact version of the firebase_core or cloud_firestore package you are using in your Flutter project's pubspec.yaml file. Using the wrong version can cause issues.

This simple addition tells your iOS project to use pre-built frameworks for Firestore, significantly reducing compile time.

Save 3 months of work

Create your app using our 6 years of making Flutter apps and more than 50+ apps

kickstarter for flutter apps

Frequently Asked Questions

Why does Firestore take a long time to compile on iOS?

When building your Flutter app for iOS, the Firebase Firestore library often needs to be compiled from source each time, which is a lengthy process.

How does adding the pod speed it up?

Adding the pod from the specified GitHub repository tells your project to use pre-built framework versions of the Firestore SDK, skipping the lengthy compilation step.

Where exactly do I add the pod line?

You add the line `pod 'FirebaseFirestore', ...` inside the `target 'Runner' do ... end` block in your `ios/Podfile` file.

What version should I use for the `:tag`?

The version number (`11.2.0` in the example) must be the same as the version of the `firebase_core` or `cloud_firestore` dependency listed in your Flutter project's `pubspec.yaml` file.

Read more
You may also be interested in
Nested navigation with Go_Router  blog card image
Nested navigation with Go_Router
Published on 2025-05-19T07:23:55.112Z
Automatically create a new Apple Store version  blog card image
Automatically create a new Apple Store version
Published on 2025-05-12T09:03:39.549Z
ApparenceKit is a flutter template generator tool by Apparence.io © 2025.
All rights reserved