1

I'm using the latest version of the Google/Analytics pod and it keeps showing the following message in the console and it's driving me nuts:

<Error> [Firebase/Core][I-COR000003] The default Firebase app has not yet been configured. Add [FIRApp configure] to your application initialization.

I don't want to install Firebase right now. I need to report to two GA suites and also can't implement GTM yet. I did try installing Firebase to get rid of the messages. However, it required me to use the Google plist file and set a tracking ID in there (I was manually configuring my trackers instead) which then caused the app to be unable to report to both GA suites and it reported double to the one suite referenced in the plist file. I've also tried using the other pod - GoogleAnalytics and that didn't solve any problems.

Ultimately, I just want to not have Google bug me with the incessant messages in the console. Any solutions?

UPDATE: I must not have cleared my console or something when I made the switch to use the GoogleAnalytics pod instead. I just tried that again and it seems to have done the trick in getting rid of Firebase nagging me for configuration.

UPDATE 2: Just found this question which has basically my same answer: https://stackoverflow.com/a/41511545/284630

Jeremy Hicks
  • 3,690
  • 5
  • 40
  • 52
  • Need to see you Podfile to know for sure, but likely a duplicate of https://stackoverflow.com/questions/46874799/annoying-firebase-log-in-xcode-console – Paul Beusterien Oct 25 '17 at 14:05
  • @PaulBeusterien My pod has this: `pod 'Google/Analytics'`. I also tried using this `pod 'GoogleAnalytics'` but it gave me the same results except that I had to go about doing the import differently by importing multiple .h files instead of just the one. – Jeremy Hicks Oct 25 '17 at 14:51
  • Look at Podfile.lock to see what in the Podfile is bringing in a Firebase dependency – Paul Beusterien Oct 25 '17 at 15:09

2 Answers2

3

Using the GoogleAnalytics pod instead of the apparently now deprecated Google/Analytics pod did the trick. The documentation here:

https://developers.google.com/analytics/devguides/collection/ios/v3/?ver=swift

is confusing because it does say to use the GoogleAnalytics pod but then says to do the following import which only works with the Google/Analytics pod:

#import <Google/Analytics.h>

The imports that are working for me instead are:

#import <GAI.h>
#import <GAIDictionaryBuilder.h>
#import <GAIFields.h> 

Basically the same answer here: https://stackoverflow.com/a/41511545/284630

Jeremy Hicks
  • 3,690
  • 5
  • 40
  • 52
0
  1. Add Firebase/Core and Google/Analytics using pods.
  2. Add GoogleService-Info.plist to your project.
  3. Open GoogleService-Info.plistmanually and theGoogleAnalytics` tracking Id.

    <key>TRACKING_ID</key>
    <string>GOOGLE_ANALYTICS_TRACKING_ID</string> //
    

You should be good to go.

Bilal
  • 18,478
  • 8
  • 57
  • 72
  • That is exactly what I tried that caused it to double report to only one of my GA suites. This setup will only allow you to report to one. That's why I wasn't using the plist file with my GA setup. I manually configure the two trackers. It looks like Firebase requires you to use the plist file. I've been unable to find any documentation regarding manual configuration for Firebase Analytics. – Jeremy Hicks Oct 25 '17 at 14:49