Cannot log events to Firebase DebugView from my Flutter FIrebase app
Asked Answered
L

2

13

I want to use Firebase analytics to log events from my Flutter app into my Firebase project's DebugView.

I am using the example app from this GitHub.

I have entered the Xcode parameters -FIRDebugEnabled and -FIRAnalyticsDebugEnabled as shown in this github issue

I changed IS_ANALYTICS_ENABLED in GoogleService-info.plist to true.

DebugView logging is not enabled.

Log events ARE going to Firebase because I can view them in StreamView.

I cannot get logs from my flutter app to be seen in Firebase / DebugView of my project.

  • I went into XCode and added the two arguments noted above as directed from others who have got this working
  • I changed IS_ANALYTICS_ENABLED from false to true in GoogleService-Info.plist.
  • I validated events were being published to Firebase because they appear in StreamView.
Lacour answered 20/9, 2019 at 23:6 Comment(2)
Having the same issue, not been able to fix it :(Examinee
did you manage to solve this?Lamoreaux
F
11

I searched and attempted most of the cases like you did and it didn't work too. But then I reset those changed and try only -FIRAnalyticsDebugEnabled and it does work for me.

I supposed you have set up and connect your project with firebase and follow example in firebase_analytics. Here what I do to enable debugview in Firebase Console.

  • android: enable with this command

    adb shell setprop debug.firebase.analytics.app com.example.app_name

  • iOS

    add -FIRAnalyticsDebugEnabled to Product\Schema\Edit Schema

Hope this would help someone out there that still encounter this problem.

Frye answered 20/10, 2020 at 16:10 Comment(2)
Apart from what @kimhak has answered, try uninstalling and reinstalling the application againHalpern
The device takes sometime to show up, more than an hour.Depressomotor
B
2

In Flutter, the only thing that worked for me was first doing @Kimhak's solution:

  1. Open XCode
  2. In the top menu bar, click "Product"
  3. Click "Scheme"
  4. Click "Edit Scheme..."
  5. Add the value -FIRAnalyticsDebugEnabled to the section "Run" with sub-header "Debug" underneath "Arguments Passed On Launch"
  6. Click "Close" (it auto-saves your added value)

Then running in your Flutter project root:

flutter clean
flutter pub get
cd ios ; pod install

That solved it for me!

Beer answered 22/7, 2023 at 6:53 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.