Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS Swift - Firebase custom event logging not working

I have set my app to log analytic events to Firebase

I have carefully followed the official Firebase tutorial

I have also watched the video here

I have added the FIRAnalyticsDebugEnabled to my scheme as you can see in the image

enter image description here

I have ensured that events have no white spaces (underscores instead) and that they meet the character limit

My Firebase core and Analytics are set correctly because I can see the standard set of Firebase events that are automatically logged and general statistics etc but NONE OF MY CUSTOM EVENTS ARE LOGGED

here is an example line of code I use to log a simple event (string):

    Analytics.logEvent(eventName, nil) //eventName is a string

This is what I see in the xcode debug console upon custom event logging:

    myapp[2977:1016413] [Firebase/Analytics][I-ACS000000] Logging event: origin, name, params: auto, error (_err), {

This debug information tells me nothing and i'm not sure FIRAnalyticsDebugEnabled is even working correctly

Any ideas on what I could be doing wrong ?

like image 926
Zigglzworth Avatar asked Oct 19 '17 12:10

Zigglzworth


1 Answers

I also ran into same issue and I tried adding -FIRAnalyticsDebugEnabled and -FIRDebugEnabled in scheme, also tried setting IS_ANALYTICS_ENABLED to true in GoogleService-Info.plist but no trace of firebase event logs in XCode console. What worked for me was unchecking OS_ACTIVITY_MODE in edit scheme and my console was flooded with log events of firebase. Hope this helps someone. Scheme Edit Snap

like image 174
Rahul Serodia Avatar answered Sep 18 '22 17:09

Rahul Serodia