bowser-js / bowser

a browser detector
Other
5.48k stars 486 forks source link

Safari iOS 15.1 and iOS 15.2 Beta version no longer detected in WKWebView #499

Closed thexeos closed 2 years ago

thexeos commented 2 years ago

Due to a bug in webkit, "Version/X" is omitted from the UA string used by WKWebView (used in all non-Safari browsers on iOS, as well as all hybrid apps) in iOS 15.1 and potentially iOS 15.2 (when that comes out), which leads to missing version component of the browser object. This also causes calls like browser.satisfies({ safari: '>=12.0' }) to fail with undefined.

Here is an example of User Agent string from a production app: Mozilla/5.0 (iPhone; CPU iPhone OS 15_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148

Screenshot from /bowser-online/ ![image](https://user-images.githubusercontent.com/2260539/141595073-2c302deb-64b2-44fb-afde-bb0e23d66074.png)
thexeos commented 2 years ago

This seems to be a combination of factors. Closing for now.