-
-
Notifications
You must be signed in to change notification settings - Fork 240
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
Detect embedded webview on iPadOS. #280
Detect embedded webview on iPadOS. #280
Conversation
iPadOS identifies as Mac OS, but ua-parser-js does the extra detection to determine if it's an iPad. Use the device model to detect when we're in an embedded webview on iPadOS. Also removes the version check for best effort webkit detection as iPadOS sends version 10.15 and checking RTCRtpTransceiver should be sufficient without the version check.
Debug log from device detection from an embedded WKWebView on iPadOS without this change:
|
@@ -188,7 +190,6 @@ export function detectDevice(): BuiltinHandlerName | undefined | |||
else if ( | |||
engineName === 'webkit' && | |||
isIOS && | |||
osVersion >= 14.3 && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand this is not super required, but what is wrong with it? Is this version requirement generating some issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, iPadOS WKWebView reports as OS Version 10.15.
Co-authored-by: Iñaki Baz Castillo <[email protected]>
Thanks, I'll merge and release next Monday or before if I can. |
Sorry for the delay. Released in 3.6.102. |
Thank you! |
iPadOS identifies as Mac OS, but ua-parser-js does the extra detection to determine if it's an iPad. Use the device model to detect when we're in an embedded webview on iPadOS.
Also removes the version check for best effort webkit detection as iPadOS sends version 10.15 and checking RTCRtpTransceiver should be sufficient without the version check.