Skip to content
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

iPad user agent is identified as mobile #554

Closed
rluttikhuizen opened this issue Nov 4, 2021 · 1 comment
Closed

iPad user agent is identified as mobile #554

rluttikhuizen opened this issue Nov 4, 2021 · 1 comment

Comments

@rluttikhuizen
Copy link

Hello,

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

@MetaMmodern
Copy link

MetaMmodern commented Dec 8, 2023

iOS 16.2 on iPad is broken
image

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.2 Safari/605.1.15

@faisalman please reopen the issue
Sorry, just saw a fresh issue #690

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants