Bug 249773

Summary: [iOS] Add API for choosing applicationNameForUserAgent based on desktop/mobile mode
Product: WebKit Reporter: Ali Juma <ajuma>
Component: WebKit APIAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: achristensen, beidson, ggaren, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Ali Juma 2022-12-22 06:57:21 PST
WKWebViewConfiguration's applicationNameForUserAgent only allows setting a single application name, that is used in both desktop and mobile mode when generating a user agent string.

However, this doesn't work for browsers (like Chrome on iOS) that want to use a different application name in desktop mode vs mobile mode.

Safari on iOS solves this problem using SPI to set the application name for desktop mode (-[WKWebPagePreferences _setApplicationNameForUserAgentWithModernCompatibility]), and non-Safari browsers would benefit from having API that achieves the same functionality.
Comment 1 Ali Juma 2022-12-22 06:57:56 PST
This is also filed as FB7428433.
Comment 2 Sam Sneddon [:gsnedders] 2022-12-23 03:22:05 PST
(In reply to Ali Juma from comment #1)
> This is also filed as FB7428433.

rdar://56905925