-
Notifications
You must be signed in to change notification settings - Fork 51
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
fix: identify mac catalyst #287
Conversation
// | ||
// Source: https://developer.apple.com/documentation/apple-silicon/adapting-ios-code-to-run-in-the-macos-environment#Handle-unknown-device-types-gracefully | ||
properties["$device_type"] = "Desktop" | ||
properties["$device_name"] = processInfo.hostName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does hostName return here? this is about the device name (Model), and not the user's name or device's nickname
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is equivalent to Host.current().localizedName
that we already use on macOS targets (Host is not available on Catalyst).
I think both return the computer name which could leak PII actually, which I agree is concerning. We describe $device_name
, however, as "Name of the device" in taxonomy
Regarding the actual device model, we capture as $device_model
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be the info of the physical device.
So if we're using Host.current().localizedName
because device.model
isn't possible, then lets keep it
fly-by that I appreciate the care and attention on this PR... some decisions are pretty hard to change and these posthog provided props are definitely that 💖 |
@pauldambra @ioannisj Thank you so much for the work on this. Excited to leverage it! How can I track when this will be in a published version of the SDK? |
https://github.com/PostHog/posthog-ios/releases/tag/3.19.3 :) |
* fix: identify mac catalyst * fix: build * fix: build tvos * fix: add properties for mac catalyst and ios running on mac * fix: same values for catalyst and ios running on mac
💡 Motivation and Context
see: https://posthog.com/questions/i-os-app-also-available-for-mac-os-is-not-showing-any-mac-os-users-in-product-analytics
Identify as
macOS
when running on Mac Catalyst or compatibility mode (Designed for iPad/iPhone).Here are the keys for the two cases:
Mac Catalyst
iOS App running on Mac (Designed for iPad/iPhone)
💚 How did you test it?
📝 Checklist