I want to test receiving Firebase Analytics events on my development device. The documentation here says you need to do this by adding a command line argument to Xcode.
To enable Analytics Debug mode on your development device, specify the following command line argument in Xcode :
-FIRDebugEnabled
How are you supposed to do this for Flutter? When you're using it through VS Code or via flutter run
?
I tried following the answer here but to no avail. I think Flutter uses Xcode build, so perhaps it makes sense that adding the params to the run scheme doesn't work with flutter?
I also tried setting IS_ANALYTICS_ENABLED
to true in GoogleService-Info.plist
, but also didn't seem to work.
I've gotten the events to now show up in the Debug Events Console on Firebase, but only if I launch the app from Xcode. If I do so from Flutter it still wont send the events (which is what I'm trying to accomplish).
To enable Analytics debug mode in your browser, install the Google Analytics Debugger Chrome extension. Once installed, enable the extension and refresh the page. From that point on, the extension will log events in your app in debug mode. You can view events logged in the DebugView in the Firebase console.
To use Firebase Analytics in a Flutter application, first you have to integrate the project with the Firebase account. In the Firebase Console, you probably need to define some new custom dimensions or metrics if you want to set custom user properties or log custom events.
The DebugView report shows you data (from events, event parameters, and user properties) as Analytics collects the data. The report can help you set up data collection, troubleshoot issues as issues arise, and understand a user's behavior as the user explores your website or app.
Metadata. Flutter plugin for Google Analytics for Firebase, an app measurement solution that provides insight on app usage and user engagement on Android and iOS.
Open Xcode
Answered at Turning Firebase Analytics on on Xcode for greater visibility added the link and answer both, Credit should the owner of this answer @checklist.
I think you might need to use Flutter flavors to pass the FIRDebugEnabled flag when you start the app with flutter run
instead of through XCode. Please see https://medium.com/@salvatoregiordanoo/flavoring-flutter-392aaa875f36
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With