-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
recognize iPadOS #387
Comments
We have also come across this issue. Here are some example user agents since Apple moved to iPadOS: Before (in a web view in an app)
After (in a web view in an app)
After (in full-fat Safari)
Is there a plan to add support for iPadOS? |
We have the same issue: |
I have the exact same string when looking at whatsmyua.info with my iPad. Interestingly, the ua string is the exact same as on my MacOS. So only by looking at the ua string, one cannot detect an iPad. Since I need this information in my use case, my workaround looks like this:
Even though MDN deprecated the |
According to https://www.theiphonewiki.com/wiki/Models you need to look for this UA, which from time to time tend to update: if you look up iPhone8,1 in the above webpage you know that it is an iPhone 6s. |
I have extracted as an example all the server-bag UA our system logged this week. /cfg/system/root # pcb_cli Devices.Device? | grep UserAgent | grep -i server |
Unlike iphones, iPads have full screen support. Could be useful for detecting ipados |
For iPad, I get following ua :
So it recognize os : MacOS ans browser Safari (instead of iPadOS and Safari mobile) |
But how do you distinguish it from Desktop Safari?
…On Sun, Apr 26, 2020, 6:42 PM vykimo ***@***.***> wrote:
For iPad, I get following ua :
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML,
like Gecko) Version/13.0.4 Safari/605.1.15
So it recognize os : MacOS ans browser Safari (instead of iPadOS and
Safari mobile)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#387 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAITXB3QHU2GN5C6JESR5O3RORP65ANCNFSM4INRAQTQ>
.
|
Currently it's my question? It has similar UA as desktop |
any news? |
I found that on iPad, if I go to Safari settings there is a setting for "Request Desktop Website". After setting this to false, the iPad device detection worked. So I guess it depends on how much you want to respect the user's "Request Desktop Website" setting. |
@TomTirapani Setting that doesn't work for me in my case running iOS 13.5.1 |
I learnt that apple has frozen the Safari user agent for some time and starting with iOS 13, on WKWebView-based solutions (e.g. Safari), iPad was removed so that iPadOS can have a full desktop class experience. The next step is what Google is doing and removing the user agent entirely (in other words, both companies have told developers "do not use the user agent"). See https://groups.google.com/a/chromium.org/forum/m/#!msg/blink-dev/-2JIRNMWJ7s/yHe4tQNLCgAJ |
Anyone have an update workaround on this? |
There are less information on safari on an ipad as far as it was mentioned. Chrome with this lib can recognice that we are on an ipad. Our workaround is smth like, if the type is not recogniced AND we have a specific resolution AND we are on safari then we can guess that we are on a device which is smaller than a normal PC. And if we have the newest iPad with width over 1300, we can show the version that we ususally have on a desktop, because it should be big enough. |
https://stackoverflow.com/questions/9038625/detect-if-device-is-ios (cherry picked from commit 5ea9f0e)
iPadOS (Beta) has 2 UAs.
User Agent in Safari on iPadOS |Apple Developer Forums
current result
ua-parser-js 0.7.20
UA: ... (Macintosh; Intel Mac OS X 10_15) ...
UA: ... (iPad; CPU OS 13_0 like Mac OS X) ...
expected result
The text was updated successfully, but these errors were encountered: