0

In my objective-c application, I added Google Analytics using Pods (this is how I add it: pod 'Google/Analytics'). In the Pods folder, I found those Firebase packages FirebaseAnalytics, FirebaseCore and the FirebaseInstanceId). When I run my application, sometimes it crash and this is what I'm getting in the console:

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

I don't call the Firebase classes anymore and I don't want to use them.

Why am I having Firebase even if I didn't add them? Why am I having this error? How can I resolve this? If I delete the packages will that cause a problem?

Pranjal Bikash Das
  • 1,092
  • 9
  • 27
Ne AS
  • 1,490
  • 3
  • 26
  • 58

2 Answers2

2

Google Analytics is not recommended anymore for mobile applications:

The Firebase SDK is the recommended method to track iOS apps.

And AFAIK, the development of the features + pod maintenance is not a priority as they fully shifted towards Firebase.

I know some legacy code has to remain on GA because of outstanding history of logs. But if you have a fresh app, I strongly recommend doing analytics with Firebase.

Michal
  • 15,429
  • 10
  • 73
  • 104
  • That's the problem. It isn't a fresh app. It was using the Google Analytics lib so I migrate it to Pods. If I disable Firebase, will that impact on the Google Analytics part? – Ne AS Nov 07 '17 at 21:57
  • @Llg for start, according to the tutorial I linked, try substituting `pod Google/Analytics` for `pod 'GoogleAnalytics'`. Maybe that'll make the problems go away and let you keep the old platform running. – Michal Nov 08 '17 at 10:24
  • As discussed in this SO question: https://stackoverflow.com/questions/44538472/cocoapods-ios-google-has-been-deprecated-how-to-get-rid-of-the-warning – Michal Nov 08 '17 at 10:25
0

The Google pod depends on Firebase. Change your Podfile to directly depend upon GoogleAnalytics without the slash.

pod 'GoogleAnalytics'
Paul Beusterien
  • 27,542
  • 6
  • 83
  • 139