-
Notifications
You must be signed in to change notification settings - Fork 324
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
Use mobile web content for iPad and desktop for mac #2918
Conversation
On hold while discussing #2908 |
@@ -136,6 +136,7 @@ final class WebViewController: UIViewController, WKNavigationDelegate, WKUIDeleg | |||
|
|||
config.userContentController = userContentController | |||
config.applicationNameForUserAgent = HomeAssistantAPI.applicationNameForUserAgent | |||
config.defaultWebpagePreferences.preferredContentMode = Current.isCatalyst ? .desktop : .mobile |
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.
If desktop is still used for Mac, I think the resulting user agent string would still unfortunately result in always serving the legacy frontend build, correct?
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.
If I set "mobile" to be used for Mac the result user agent is even worse:
Mozilla/5.0 (iPad; CPU OS 14_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Home Assistant/2024.8 (io.robbie.HomeAssistant.dev; build:2024; macOS 14.5.0) Mobile/HomeAssistant, like Safari
Says "iPad" and "OS 14_5" which is not the iPad version (it's macOS version)
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.
Ugh, yeah that's terrible. Like I said, Apple's fault.
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.
Indeed and looking at historic data, they are not working to improve this 😅
Now we need a solution for macOS |
Summary
Screenshots
Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#
Any other notes