Skip to content
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

iOS Safari 10 minor versions not recognised #177

Open
camslice opened this issue Jan 3, 2023 · 1 comment
Open

iOS Safari 10 minor versions not recognised #177

camslice opened this issue Jan 3, 2023 · 1 comment

Comments

@camslice
Copy link

camslice commented Jan 3, 2023

All minor & patch versions of iOS Safari 10 return 0 as the minor version. It is impossible to target minor versions.

For example, the UA string for iOS Safari version 10.1 is:

Mozilla/5.0 (iPhone; CPU iPhone OS 10_1 like Mac OS X) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0 Mobile/14B72 Safari/602.1

If you run lookup() on this string, it will return:

{ name: 'mobileSafari', major: 10, minor: 0, patch: 0 }

Obviously the Version in the UA string is 10.0, however on iOS the version of Safari always matches the version of the OS. If you update iOS, the Safari version is also updated. For some reason iOS Safari UI strings don't have the minor version updated in the Version section, so you need to consider the OS minor and patch versions.

Please see this RunKit for a demonstration with more examples: https://runkit.com/camslice/ios-safari-10-minor-versions-not-recognised

@camslice
Copy link
Author

camslice commented Jan 3, 2023

FYI @3rd-Eden I came across this issue in another library

There is some confusion around iOS Safari versions, because the only "official" way according to Apple to check which version of iOS Safari is installed, is to refer to the operating system version. This implies that there are iOS Safari versions to match all major, minor and patch releases of the operating system, for example:

However, if you refer to these two links, it appears that there are far fewer distinct Safari releases and they are in fact tied to the Webkit version, not the OS version. According to these links, iOS Safari v10.3 does not exists:

There is also some interesting reading on this StackExchange answer

Let me know your thoughts, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant