From 947a47943bb7f5378ecdd3f8f7b187e45fbc6860 Mon Sep 17 00:00:00 2001 From: Doug Date: Tue, 11 Aug 2026 12:35:34 +0100 Subject: [PATCH] Set Element Call's user-agent back to the default but include the bundle name. Apparently livekit-js-sdk does feature detection based on UA sniffing. --- ElementX/Sources/Screens/CallScreen/View/CallScreen.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ElementX/Sources/Screens/CallScreen/View/CallScreen.swift b/ElementX/Sources/Screens/CallScreen/View/CallScreen.swift index b0ecc383b..12912d44c 100644 --- a/ElementX/Sources/Screens/CallScreen/View/CallScreen.swift +++ b/ElementX/Sources/Screens/CallScreen/View/CallScreen.swift @@ -117,6 +117,7 @@ struct CallView: UIViewRepresentable { configuration.userContentController = userContentController configuration.allowsInlineMediaPlayback = true configuration.allowsPictureInPictureMediaPlayback = true + configuration.applicationNameForUserAgent = InfoPlistReader.main.bundleDisplayName if let script = viewModelContext.viewState.script { let userScript = WKUserScript(source: script, injectionTime: .atDocumentEnd, forMainFrameOnly: false) @@ -129,8 +130,6 @@ struct CallView: UIViewRepresentable { webView.isInspectable = true webView.scrollView.contentInsetAdjustmentBehavior = .never // Let Element Call manage the safe areas within the web view. - webView.customUserAgent = UserAgentBuilder.makeASCIIUserAgent() - // https://stackoverflow.com/a/77963877/730924 webView.allowsLinkPreview = true