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
We use react-device-detect to determine if our app runs on a tablet or mobile device. react-device-detect uses ua-parser-js as parser.
When we run our Ionic React app on an iPad 8th gen with iOS 14.6, the user agent is Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148.
In this case the getDevice() method returns mobile as type. This causes react-device-detect to identify the platform as mobile (unexpected result).
In a demo project we stub the user agent as Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) (so without the Mobile/15E148). Now the getDevice() method returns undefined. Based on other information, react-device-detect is able to determine that we run on a tablet (expected result).
The result I expected was that the user agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 would be interpreted as undefined, just like Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko).
Kind regards,
Ronald
The text was updated successfully, but these errors were encountered:
Hello,
We use
react-device-detect
to determine if our app runs on a tablet or mobile device.react-device-detect
usesua-parser-js
as parser.When we run our Ionic React app on an iPad 8th gen with iOS 14.6, the user agent is
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148
.In this case the
getDevice()
method returnsmobile
astype
. This causesreact-device-detect
to identify the platform asmobile
(unexpected result).In a demo project we stub the user agent as
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko)
(so without theMobile/15E148
). Now thegetDevice()
method returnsundefined
. Based on other information,react-device-detect
is able to determine that we run on a tablet (expected result).The result I expected was that the user agent
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148
would be interpreted asundefined
, just likeMozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko)
.Kind regards,
Ronald
The text was updated successfully, but these errors were encountered: