Open lancedikson opened 8 years ago
+1
+1
+1
+1 - just had to sniff for social app webviews (as best as possible) and not use bower if those were detected
+1
Here are some UAs I've received from error logging.
Mozilla/5.0 (iPhone; CPU iPhone OS 12_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/16B92 Instagram 70.1.0.15.98 (iPhone10,2; iOS 12_1; en_US; en-US; scale=2.61; gamut=wide; 1080x1920; 130350235)
Mozilla/5.0 (Unknown; Linux x86_64) AppleWebKit/538.1 (KHTML, like Gecko) Safari/538.1 Daum/4.1
Mozilla/5.0 (iPhone; CPU iPhone OS 12_0_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/16A404 Instagram 70.1.0.15.98 (iPhone9,1; iOS 12_0_1; en_US; en-US; scale=2.00; gamut=wide; 750x1334; 130350235)
Mozilla/5.0 (iPhone; CPU iPhone OS 12_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/16B92
Mozilla/5.0 (iPhone; CPU iPhone OS 12_0_1 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) GSA/61.0.217752169 Mobile/16A404 Safari/604.1
Mozilla/5.0 (iPhone; CPU iPhone OS 12_0_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/16A404 [FBAN/FBIOS;FBAV/192.0.0.61.85;FBBV/126707849;FBDV/iPhone10,1;FBMD/iPhone;FBSN/iOS;FBSV/12.0.1;FBSS/2;FBCR/Sprint;FBID/phone;FBLC/en_US;FBOP/5;FBRV/127817253]
Mozilla/5.0 (iPhone; CPU iPhone OS 12_0_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/16A404 Instagram 70.0.0.14.98 (iPhone10,3; iOS 12_0_1; en_US; en-US; scale=3.00; gamut=wide; 1125x2436; 129989597)
Mozilla/5.0 (iPad; CPU OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Mobile/14G60 [FBAN/MessengerForiOS;FBAV/189.0.0.41.99;FBBV/128677242;FBDV/iPad5,3;FBMD/iPad;FBSN/iOS;FBSV/10.3.3;FBSS/2;FBCR/;FBID/tablet;FBLC/en_US;FBOP/5]
Looks like Instagram and Facebook Messenger for the most part.
Any news about this feature? It's very useful for my project
Unfortunately, not. But seems to be quite a wanted feature. I guess I won't have enough time to do it, so it's open for an enthusiastic programmer to code it :)
yes would be definitely a great feature. I am wondering: Could you say "webview" is same as "websoftware" because i would also love to know if the ua is coming from e.g. Microsoft Office, etc.
@maerzhase, well, the terms seem very close to me. However, we could add MS Office detection regardless of the webview detection I guess.
@lancedikson Do you have an idea how to implement the ms office detection? Sorry i didn't yet look at the code yet but I would be up for helping with the implementation. Maybe you have a good place to start?
I submitted a pull request regarding this issue: #452
This would be super useful! WebViews are limited in certain features and detecting them would be great.
@eimanip randomly found this issue - I checked the code and I don't think this detects a webview, just detects safari on iOS or chrome android? not specifically a webview - let me know if I'm wrong because I'm trying to do the same ;)
@eimanip randomly found this issue - I checked the code and I don't think this detects a webview, just detects safari on iOS or chrome android? not specifically a webview - let me know if I'm wrong because I'm trying to do the same ;)
Sorry for the delayed response.
Did you check the tests in the pull request? It does specifically checks if it's a webview. Basically, for iOS you should check for the absence of Safari
word in the user agent. On the other hand, you should check for the presence of wv
in the user agent for Android webview.
You can check out the following resources for more information: is-ua-webview, Stackoverflow, Stackoverflow
Detect WebView on Android and iOS. Android Docs