[Series] Continuously Improving Your Flutter App: Setting up Firebase
Article Summary
Amorn Apichattanakul from KBTG reveals why shipping code isn't the finish line. The real work starts when users download your app—and most teams miss this critical step.
This practical guide walks through setting up Firebase with Flutter to enable continuous app improvement post-launch. Amorn focuses on the often-neglected maintenance phase of SDLC, showing how to properly configure Firebase for tracking crashes, performance, and analytics across development and production environments.
Key Takeaways
- Firebase analytics can take up to an hour without debug mode enabled
- Use Flutter flavors to separate dev and production data completely
- Add WidgetsFlutterBinding.ensureInitialized() before runApp or Firebase won't work
- Configure separate Xcode schemes and Android build flavors for each environment
- Real-time debugView reduces analytics delay from 1 hour to 3-5 seconds
Proper Firebase setup with environment separation prevents data contamination and enables near real-time monitoring of your Flutter app in production.
About This Article
Amorn Apichattanakul found that Firebase analytics can take up to an hour to show up in the console if debug configuration isn't set up properly. This creates blind spots when developers are building and testing.
KBTG turned on real-time debugView by running platform-specific commands. For Android, they used 'adb shell setprop debug.firebase.analytics.app package_name'. For iOS, they added the '-FIRDebugEnabled' launch argument in Xcode.
Real-time debugView cut the analytics delay from 60 minutes down to 3-5 seconds. Developers can now watch how their app behaves right away during development instead of waiting.