serbanghita / Mobile-Detect

Mobile_Detect is a lightweight PHP class for detecting mobile devices (including tablets). It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.

Home Page:http://mobiledetect.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Safari on iPad: completely incorrect reports

av01d opened this issue · comments

Issue description
Using version 3.74.0 of this library, Safari on iPad causes all kinds of incorrect detections.
Both isMobile() and isTablet() are reported as false, while they both should be true.
isIOS(), isIPad() and isIpadOS() also yield false (should be true).

Chrome on the same iPad does report correctly (true for isMobile(), isTablet(), isIPad() and isIOS());

Easily tested on https://demo.mobiledetect.net as well.

User-Agent(s)
UserAgent of my Safari on iPad: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.5 Safari/605.1.15

Suggestions
Please fix?

Hello @av01d

all modern iPads (except iPad mini) are using "Desktop" as default mode.
Devices appear as an MacBook like device.

Switch to "Mobile" in your Safari settings to act as an mobile device.
If switched to mobile mode in safari all your mentioned is**** will be true also using Safari.

Apple changed this behaviour long time ago.

kind regards