segmentio / analytics-ios

The hassle-free way to integrate analytics into any iOS application.
https://segment.com/libraries/ios
MIT License
402 stars 334 forks source link

Automatic screen tracking tracks any view controller in a `UINavigationController` or `UITabBarController` twice #1032

Open simondelphia opened 2 years ago

simondelphia commented 2 years ago

Any view controllers that I have inside of a UINavigationController or UITabBarController are tracked twice. Once via the viewDidAppear of the parent, and once via the viewDidAppear of the child view controller. In both cases the screen in seg_trackScreen is the child view controller type. Can only distinguish the calls by putting a breakpoint and looking at the call hierarchy.

Is there any way to prevent this double tracking?

image