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 2019 is not recognized as tablet! #820

Closed
AdiAlex opened this issue Nov 17, 2019 · 10 comments
Closed

iPad 2019 is not recognized as tablet! #820

AdiAlex opened this issue Nov 17, 2019 · 10 comments

Comments

@AdiAlex
Copy link

AdiAlex commented Nov 17, 2019

Hello
My new iPad (2019 - 7th generation, iPadOS 13.2.2) is not recognized as tablet. Can you solve this problem?
Thank you very much.
Greetings from Switzerland
Adrian

IMG_0035

Please specify the User-Agent. Go to https://demo.mobiledetect.net and copy-paste it here.

@mlaurense
Copy link

I'm facing the same issue, but I'm not sure this is a problem with the Mobile Detect library... The iPad is wrongly identifying itself as a computer, to make sure the servers sends a desktop view to the browser. See also this thread at Apple, started July 2nd... https://forums.developer.apple.com/thread/119186

Apparently there is a switch in the settings to control this, but Apple in all its wisdom has decided that faking a computer on a tablet screen is a good idea, completely overlooking the fact that as a webdeveloper you might want to alter the HTML to provide a better user interface for touch screens.

FWIW: Chrome on iPad still identifies itself as iPad...

@RazorEdgexD
Copy link

Opened Settings -> Safari -> Request Desktop Website -> All websites.

That option is enabled by default. I disabled it and the proper User Agent is now displayed.

https://forums.developer.apple.com/thread/119186

@dorhivert
Copy link

You can switch of one iPad (assuming you are the owner) by this settings.
But as far as I know currently there is no option to distinguish iPads that use the default settings with Safari (and that is - over 90% of iPads) from Macs, as they have the exact same user agent.

dinuionut added a commit to jobstertheme/Mobile-Detect that referenced this issue Jul 10, 2020
Mac Safari
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Safari/605.1.15

iPad Safari
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Safari/605.1.15

iPad Ionic App Webview 
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148

Related:
https://developer.apple.com/forums/thread/119186
serbanghita#554
serbanghita#795
serbanghita#809
serbanghita#820
serbanghita#827
@Manviel
Copy link

Manviel commented Aug 13, 2020

Same issue

@kamyweb
Copy link

kamyweb commented Nov 10, 2020

My quick fix on ipad air 2020
$detect->match('Macintosh|Mac.*OS.*X')

@Tommasov
Copy link

Tommasov commented Feb 5, 2021

My quick fix on ipad air 2020
$detect->match('Macintosh|Mac.*OS.*X')

Thank you!

@serbanghita
Copy link
Owner

Just like @mlaurense and @RazorEdgexD pointed out, there is nothing the library can do without breaking existing tests.

I would go with @kamyweb 's response. I will put his response in the https://github.com/serbanghita/Mobile-Detect/blob/master/docs/KNOWN_LIMITATIONS.md

@aqres
Copy link

aqres commented Dec 5, 2021

My quick fix on ipad air 2020
$detect->match('Macintosh|Mac.*OS.*X')

How does this work as a fix to identify iPad ???

@vdite
Copy link

vdite commented Dec 6, 2021

this would match all Macs with macOS

@aqres
Copy link

aqres commented Dec 6, 2021

Yes indeed - and iPads (as I confirmed by testing it just now). I was puzzled because I thought the rule was being put forward in some way as a method to recognise iPads.

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

No branches or pull requests

10 participants