-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 Air and iPad Pro - type not correctly identified #690
Comments
If you use getOS function through the ipads, what is returned inside { name } of both of them? |
Hi @rickson-simoes, in both cases I get |
I am facing same issue, it cannot detect Ipad with latest iOS 17, i am getting - |
Since Apple froze its user agent in version 10.15.7, we haven't yet find a reliable solution that can be derived from only the user agent data (as in the Chrome Dev Tools case). However, if we are using a real browser in iPad we can try to do an additional check for iPad-specific browser features: const uap = new UAParser();
const device1 = uap.getDevice();
const device2 = uap.getDevice().withFeatureCheck();
console.log(device1); // { vendor : "Apple", model : "Macintosh", type : undefined }
console.log(device2); // { vendor : "Apple", model : "iPad", type : "tablet" } |
@faisalman Thanks for the workaround. Small question: Does calling |
Hi @faisalman what are valid values for |
https://docs.uaparser.dev/api/ua-parser-js/idata/with-feature-check.html |
Library version
v1.0.37
Describe the bug
iPad Pro and iPad Air user agents from Chrome Dev Tools are not recognized as tablets. Mentioning Chrome Dev Tools here as I can't rule out Chrome using incorrect user agents.
To Reproduce
Steps to reproduce the behavior:
device
is returned as{ vendor: 'Apple', model: 'Macintosh', type: undefined }
Alternatively use one of these user agents which is what my Chrome (Version 119.0.6045.124) is using:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15
Expected behavior
device
returned as{ vendor: 'Apple', model: 'iPad', type: 'tablet' }
The text was updated successfully, but these errors were encountered: