hisorange / browser-detect

Browser Detection for Laravel by hisorange!
https://browser-detect.com
MIT License
1.09k stars 144 forks source link

In App User Agents are showing as Tablets #213

Closed JamesFreeman closed 10 months ago

JamesFreeman commented 10 months ago

Hey, happy new year!

We're currently having an issue where inApp Browsers on iPhones are being detected as a tablet instead of a mobile

PHP Version: 8.2 hisorange/browser-detect: 5.0.1 mobiledetect/mobiledetectlib: 3.74.3

Instagram iPhone 14 InApp Browser

Mozilla/5.0 (iPhone; CPU iPhone OS 15_6_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/19G82 Instagram 312.0.1.19.124 (iPhone14,2; iOS 15_6_1; en_GB; en; scale=3.00; 1170x2532; 548339486)

"isMobile": false,
"isTablet": true,
"isDesktop": false,
"isInApp": true,

Facebook iPhone 14 InApp Browser

Mozilla/5.0 (iPhone; CPU iPhone OS 17_1_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 [FBAN/FBIOS;FBAV/439.0.0.28.117;FBBV/548221922;FBDV/iPhone14,7;FBMD/iPhone;FBSN/iOS;FBSV/17.1.2;FBSS/3;FBCR/;FBID/phone;FBLC/en-GB;FBOP/80]

"isMobile": false,
"isTablet": true,
"isDesktop": false,
"isInApp": true,
hisorange commented 10 months ago

Yeah, good catch! In the next major release I will get rid of the tablet category. The issue above came from the categorization of "phablet" which was relevant couple years ago, but an iPhone ## Pro Max is still a mobile and the phablet category merged into big screen mobiles.

For now, I have patched the script and the next minor release will change the above categorizations into mobile, or any other phablet.

hisorange commented 10 months ago

Please update to 5.0.2 to find a fixed version.

Thanks for the report, and have a wonderful day.

JamesFreeman commented 10 months ago

Thanks for the quick response. I'll get it tested on Monday morning. Have a great weekend.