atomantic / is-ua-webview

📱tiny/simple npm module for detecting webview status of a user-agent
ISC License
58 stars 7 forks source link

Doesn't work in iPhone 8 Plus, Gmail App #2

Open n-sviridenko opened 5 years ago

n-sviridenko commented 5 years ago

Doesn't work for Mozilla/5.0 (iPhone; CPU iPhone OS 12_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Mobile/15E148 Safari/604.1 (iPhone 8 Plus, Gmail App)

n-sviridenko commented 5 years ago

It uses WKWebView I assume.

atomantic commented 5 years ago

It might also be using a SFSafariViewController, which would share cookies with the native Safari instance... My original intention for capturing webview was to know if cookies and other data would consistently silo/delete from the source. Perhaps we need some new labels/detections here...

atomantic commented 5 years ago

I think since that user agent is the same as the user agent of native Safari, they are either using the SFSafariViewController or spoofing the user-agent by just changing the ua value to look like native Safari. Just to double check, are you seeing a different user-agent on that device on native Safari? If it is indeed the same string, we wouldn't want to call that a webview so I would say we just can't address it without more robust detection than user-agent string parsing.