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.
http://mobiledetect.net
MIT License
10.55k stars 2.68k forks source link

Safari on iPad: completely incorrect reports #930

Closed av01d closed 1 year ago

av01d commented 1 year ago

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?

darapa1 commented 1 year ago

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