cbschuld / Browser.php

A PHP Class to detect a user's Browser. This encapsulation provides a breakdown of the browser and the version of the browser using the browser's user-agent string. This is not a guaranteed solution but provides an overall accurate way to detect what browser a user is using.
https://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/
MIT License
580 stars 303 forks source link

iOS Browser Detection #53

Open njoye opened 8 years ago

njoye commented 8 years ago

On iOS Safari getBrowser() would return "iPhone" as Browser and (for me) "9.0" as Version, which is actually enough for my purposes, but it could still be a problem for developers that need to go further than me in detecting Browsers. But using Mozilla Firefox on iOS, again the function returns "iPhone", but isn't able to detect the Version, therefore returns "unknown". I didn't test it for other Browsers on iOS but i'm assuming that it's not possible to detect the specific browser as well. Tested on an iPhone SE (iOS 9.3.5, newest versions of Firefox and (obviously) Safari, atm)

cariacou commented 7 years ago

same issue here

tonarii commented 7 years ago

Hello, same problem. I try to detect Firefox on iOS and it returns me Iphone. Also, i use a script to add an opensearch service, and when i try to use it on firefox iOS, it tells me that i'm not on a mozilla platform. I have no problem on Firefox mobile on Android, detection and opensearch service works great.

miguelgf commented 6 years ago

This User Agent:

Mozilla/5.0 (iPhone; CPU iPhone OS 11_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.0 Mobile/15E148 Safari/604.1

Is shown as iPhone browser name instead of Safari.

gejobj commented 5 years ago

Hello, same problem. I try to detect Firefox on iOS and it returns me Iphone. Also, i use a script to add an opensearch service, and when i try to use it on firefox iOS, it tells me that i'm not on a mozilla platform. I have no problem on Firefox mobile on Android, detection and opensearch service works great.

Firefox on iOS is fixed here: https://github.com/cbschuld/Browser.php/pull/71

Best regards.

iWECon commented 5 years ago

same issue here

cbschuld commented 5 years ago

@iWECon - the latest version fixes the firefox on ios issue or at least should; I'll build tests for it but you should be okay now. I'll circle back w/ tests before I close this.