You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sentry currently reports all iPad users as being on macOS due to both platforms using the same user-agent string. I propose a one-line feature check is added so that iPad sessions can be recorded/tagged properly.
Solution Brainstorm
Safari on iPad (and embedded web views in Cordova/Capacitor apps) use the same user agent as Safari on Mac, and currently Sentry "takes the userAgent string at its word" and reports these users as Mac users.
There is a well-known method for determining whether a page is being viewed on an iPad that is pretending to be a Mac – you check the value of navigator.maxTouchPoints:
navigator.maxTouchPoints is always 1 on a Mac (since there's no touchscreen) and 10 on an iPad. And yes, navigator.platform is MacIntel even on ARM/M1+ chips.
I have real-world situations where behaviors differ on Safari-Mac and Safari-iPadOS, and it would be very helpful to have these segmented out in Sentry.
Thanks for your consideration!
The text was updated successfully, but these errors were encountered:
Hey @banjerluke thank you for writing in! I don't think we're going to add to the SDK at the current moment, but I recommend just adding this as a tag to your Sentry events. That way you can sort/filter through errors and performance pageloads accordingly.
Problem Statement
Sentry currently reports all iPad users as being on macOS due to both platforms using the same user-agent string. I propose a one-line feature check is added so that iPad sessions can be recorded/tagged properly.
Solution Brainstorm
Safari on iPad (and embedded web views in Cordova/Capacitor apps) use the same user agent as Safari on Mac, and currently Sentry "takes the userAgent string at its word" and reports these users as Mac users.
There is a well-known method for determining whether a page is being viewed on an iPad that is pretending to be a Mac – you check the value of
navigator.maxTouchPoints
:navigator.maxTouchPoints
is always1
on a Mac (since there's no touchscreen) and10
on an iPad. And yes,navigator.platform
isMacIntel
even on ARM/M1+ chips.Here's an example of this bit of iPad-detection seen in the UAParser library.
I have real-world situations where behaviors differ on Safari-Mac and Safari-iPadOS, and it would be very helpful to have these segmented out in Sentry.
Thanks for your consideration!
The text was updated successfully, but these errors were encountered: