Firebase Analytics continuously monitors UINavigationController

I am switching from Google Analytics to Firebase Analytics. Unlike Google Analytics, Firebase automatically monitors screen views, which is great! But instead of tracking the screen, it constantly tries to track the UINavigationController. I get the following error log twice each time I switch to another view controller.

[Firebase / Analytics] [I-ACS031006] View controller is already tracked. Class, ID: UINavigationController, -1770652405567491888

Is any configuration required if you have a navigation controller? How to get auto screen tracking in this scenario?

UPDATE: I have not found a solution yet, but at least I have found the cause of the problem. Firebase doesn't seem to understand your view controller hierarchy if your initial view controller is an input panel controller. My initial view controller in my main bulletin board is the tab bar controller. If I take this, I get good screen tracking reports from my application.

UPDATE: Looks like I found the OK solution, but I'm still wondering if anyone has a better idea. Since Firebase sees all the view controllers in my tab bar controller as the same UINavigationController, I can call setScreenName manually in viewDidAppear for all of them.

Analytics.setScreenName(screenName, screenClass: screenClass)

, Google Analytics, , UINavigationController , . Firebase, , , v4.0.0 Firebase SDK.

+4
1

Google Analytics Firebase. . Firebase 3.8.0 iOS. doc. :

, , firebase_screen_class (, menuViewController MenuActivity) firebase_screen_id. UIViewController Activity , Google Analytics , .

manually setCurrentScreen(). ScreenName , , , .

, setScreenName , , , logEvent().

+2

Source: https://habr.com/ru/post/1681364/


All Articles