Skip to content

Commit d8e2b30

Browse files
committed
fix: Repair applicationNameForUserAgent usage
This is a value on the WebView configuration, not the WebView itself.
1 parent 28dc6aa commit d8e2b30

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ios/Sources/GutenbergKit/Sources/EditorViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public final class EditorViewController: UIViewController, GutenbergEditorContro
177177

178178
self.webView = GBWebView(frame: .zero, configuration: config)
179179
self.webView.scrollView.keyboardDismissMode = .interactive
180-
self.webView.applicationNameForUserAgent = "GutenbergKit/\(GutenbergKit.version)"
180+
self.webView.configuration.applicationNameForUserAgent = "GutenbergKit/\(GutenbergKit.version)"
181181

182182
self.isWarmupMode = isWarmupMode
183183

ios/Sources/GutenbergKit/Sources/Views/HTMLPreview/HTMLWebViewRenderer.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ final class HTMLWebViewRenderer {
9494
// Create web view with small initial frame for off-screen rendering
9595
// Frame will be adjusted per render based on viewport width and content height
9696
webView = WKWebView(frame: CGRect(x: 0, y: 0, width: 1200, height: 100), configuration: config)
97-
webView.applicationNameForUserAgent = "GutenbergKit/\(GutenbergKit.version)"
97+
webView.configuration.applicationNameForUserAgent = "GutenbergKit/\(GutenbergKit.version)"
9898

9999
delegate = RenderDelegate()
100100
webView.navigationDelegate = delegate

0 commit comments

Comments
 (0)