ClockWise
ClockWise

Reputation: 1519

Why is Firebase Analytics disabled for my iOS app?

I've written an app which uses Firebase. I have installed it properly, I believe, and I've done the [FIRApp configure]; in - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

I've also added the debug arguments for the project scheme to see what's happening. Firebase seems to be working as intended, except that it keeps telling me that Firebase analytics is disabled.

My log in Xcode:

Firebase screen reporting is enabled. Call +[FIRAnalytics setScreenName:setScreenClass:] to set the screen name or override the default screen class name. To disable screen reporting, set the flag FirebaseScreenReportingEnabled to NO (boolean) in the Info.plist
Configuring the default app.
InstanceID library version 2.0.5
Debug mode is on
Firebase Analytics v.40004000 started
Firebase Analytics disabled
Tracking view controller. Class, ID: MainViewController
Screen view event not logged. App is not active.
Firebase Analytics is disabled. Event not logged

So Firebase obviously works, but it won't let me send any events, custom or otherwise. I can't find anyone else with this issue. I believe my project is correct set up in console.firebase.com but it simply won't send any data there. I have downloaded and added my GoogleServices-Info.plist file. My app is targeted iOS9 and above, and I'm using Objective-C.

I've followed this guide: https://firebase.google.com/docs/ios/setup#add_firebase_to_your_app

Edit

My project is old, before Firebase existed. So I imported it from Google Cloud Platform. I'm thinking this might be the issue. I tried creating an entirely new project on another account and then added a completely new app. Firebase worked as intended. Anyone experienced any issues when migrating from Google Cloud Platform?

Upvotes: 9

Views: 6081

Answers (2)

Siyuan Zhang
Siyuan Zhang

Reputation: 405

TL;DR try update Firebase SDK to latest version.

Just incase anyone see this thread. We have met a similar situation like @ClockWise met. however, after trying tweak with info.plist. it turn's out the reason was the version of SDK.

We use to have version 6.11.0(firebase), and 6.1.3(firebase analytics), after running pod update to update sdk to latest version(6.21.0), it works properly, debug view is working, and we can see the events in firebase dashboard.

Upvotes: 1

ClockWise
ClockWise

Reputation: 1519

So I finally found the issue. After creating a new project entirely and moving my app to that project it still didn't work. So I started to scan through the entire project for anything that might cause Firebase to disable logging.

Turns out FIREBASE_ANALYTICS_COLLECTION_DEACTIVATED was set to YES in the Info.plist file. I have no idea why, since the project didn't use Firebase at all until I started to add it. Hope this blunder helps someone else with the same issue.

Upvotes: 14

Related Questions