Slow builds, whether locally or in the CI, reduce developer productivity. If you integrated Firestore into your Flutter app, you might have experienced slow build times in your apps.
There have been issues that outline the slow build times developers experience when Firestore is added as a dependency:
These issues affect the speed of getting out builds to testers and users, and it's also expensive to pay for macOS CI machines on the cloud.
Use pre-compiled Firestore iOS SDK
The issue is caused by the 500k+ lines of mostly C++, which gets compiled as part of the Xcode build process and takes a long time.
The precompiled Firestore iOS SDK
solves this problem. It includes
xcframework files extracted from the Firebase iOS SDK repository are released and tagged using the Firebase iOS SDK versions.
GitHub - invertase/firestore-ios-sdk-frameworks: ⚡ Precompiled Firestore iOS SDKs extracted from the Firebase iOS SDK repository release downloads for faster build times.
⚡ Precompiled Firestore iOS SDKs extracted from the Firebase iOS SDK repository release downloads for faster build times. - GitHub - invertase/firestore-ios-sdk-frameworks: ⚡ Precompiled Firestore...
Find your Firebase iOS SDK version
cloud_firestore dependency, check for the Firebase SDK version in the
- cloud_firestore (3.2.1):
- Firebase/Firestore (= 9.2.0)
ios/Podfile.lock 9.2.0 is the Firebase SDK version of this project.
supported versions for the precompiled Firestore iOS SDK. Update your Podfile
ios/Podfile, reference the precompiled Firestore iOS SDK git repository inside your
target 'Runner' do
# Add this line
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '9.2.0'
flutter packages get.
It's a wrap
My tests showed that using the precompiled iOS SDK for Firestore
reduced 67% of iOS my project's build time in the CI.
See the runs at
GitHub - joshuadeguzman/flutter_firebase_precompiled_sdk
Contribute to joshuadeguzman/flutter_firebase_precompiled_sdk development by creating an account on GitHub.
Give it a try, and let me know what your build times are at
The link has been copied!