New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bundle Path Check Fails for Modularized App Structures on Real iOS Devices #858
Labels
type:defect
Bugs or weaknesses. The issue has to contain steps to reproduce.
Milestone
Comments
mylifeasdog
added
the
type:defect
Bugs or weaknesses. The issue has to contain steps to reproduce.
label
Jan 18, 2024
mylifeasdog
added a commit
to mylifeasdog/snowplow-ios-tracker
that referenced
this issue
Jan 18, 2024
mylifeasdog
added a commit
to mylifeasdog/snowplow-ios-tracker
that referenced
this issue
Jan 18, 2024
mylifeasdog
added a commit
to mylifeasdog/snowplow-ios-tracker
that referenced
this issue
Jan 18, 2024
mylifeasdog
added a commit
to mylifeasdog/snowplow-ios-tracker
that referenced
this issue
Jan 18, 2024
matus-tomlein
pushed a commit
that referenced
this issue
Jan 19, 2024
matus-tomlein
pushed a commit
that referenced
this issue
Jan 19, 2024
matus-tomlein
pushed a commit
that referenced
this issue
Jan 19, 2024
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
The current implementation of
UIViewController
extension in Snowplow SDK uses a method swizzling technique to track screen views. It checks the bundle path to differentiate between the main app and system view controllers. However, in modularized app structures where different components of the app are separated into dynamic frameworks, this check fails on actual iOS devices. This is because the symbolic link between/private/var/
and/var/
leads to the main app bundle and framework bundles being treated differently, affecting tracking accuracy.To Reproduce
Steps to reproduce the behavior:
Expected behavior
The Snowplow SDK should consistently track screen views across all parts of a modularized app, on both iOS simulators and actual devices. Specifically:
/private/var/
and/var/
are effectively the same due to symbolic linking, which is not accounted for in the current implementation.Screenshots
Device information:
Additional context
The issue seems to stem from the method
sp_viewDidAppear
in the SDK, which checks the bundle path prefix to filter out system view controllers. On real iOS devices, due to the symbolic link in the file system, this check incorrectly filters out view controllers from dynamically loaded frameworks. Specifically, the main app bundle path starting with/private/var/
and the dynamic framework paths starting with/var/
actually refer to the same physical location on the device's file system. This similarity in paths should be accounted for in the SDK's path check logic. A proposed solution involves modifying the path check to account for symbolic links and standardizing the paths before comparison.The text was updated successfully, but these errors were encountered: