-
Notifications
You must be signed in to change notification settings - Fork 892
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
Does not detect iOS 13 beta #95
Comments
related: bowser-js/bowser#329 |
Latest iPhone GM build has the following user agent
iPadOS 13 is a different story since Apple just sends a desktop user agent. |
Thanks for contributing, but...
|
The current state of things is:
Mobile-Detect PHP is unrelated to this issue. |
From the decision of Apple to remove iPad signature from userAgent string, it can be concluded that they don't want iPad to be treated differently than desktop. Ask Apple if it was their intention. This library only takes the regular expressions from the PHP project (thanks to Serban) and doesn't apply special logic to try to do more detections. Most consumers use the lib server-side with Node.js and don't have info about touch/no-touch. In Readme, there is a note that the lib should not be used directly everywhere in the code. It should be wrapped. In the wrapper, you can add touch-detection and all you need to correctly classify the devices. |
Using a wrapper to implement the touch detection hook is not adequate to solve this issue. The reason being is that we are only able to test if items are defined or not, which leaves us in a situation where we classify every I forked this repo and made a change to the |
There is already a mechanism to extend the class - see Extending. |
yes, that is a better way to do extending on most cases. For my case, I opted to modify the original function. No, I don't think this belongs in the main repo, it would be best to keep this isolates to UA tests as I expect is your intent. It would be nice to see a better state of the return values in these broken states, as If anyone is looking to implement their own solution, here is the basics:
Test against multiple iOS 13 UA's, for example:
then set values to the cache:
I expect this issue can be closed here. |
We are testing on the iOS 13 beta, and mobile detect is failing. This includes the demo.
Here is the results of the demo:
This causes the website to be treated as desktop because the functions for mobile, phont and tablet, as well as os and userAgent, all return
null
.The text was updated successfully, but these errors were encountered: