browserslist / browserslist

🦔 Share target browsers between different front-end tools, like Autoprefixer, Stylelint and babel-preset-env

Home Page:https://browsersl.ist

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support iOS WKWebView embedded browser in app

innomatics opened this issue · comments

The current iOS or ios_saf queries don't seem to recognise the embedded browser in a native iOS app using WKWebView component.

User agents from these embedded browsers are something like:
Mozilla/5.0 (iPhone; CPU iPhone OS 17_1_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.1 Mobile/15E148

c.f. a regular iOS Safari user agent:
Mozilla/5.0 (iPhone; CPU iPhone OS 17_1_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.1 Mobile/15E148 Safari/604.1

So the web view browser user agent string is truncated in comparison, and missing the Safari/.* part at the end.

It would be useful to allow the webview with ios version e.g. support a query in browserslist like:

ios_app >= 17

Should we open this issue in https://github.com/browserslist/browserslist-useragent-regexp instead?

Browserslist core doesn't work with user agents strings.