Skip to content

Commit

Permalink
Merge pull request #65 from steelbrain/steelbrain/inspectable-locally
Browse files Browse the repository at this point in the history
Make PWA inspectable during dev
  • Loading branch information
khmyznikov committed Feb 16, 2024
2 parents c1596cf + b4ca506 commit 2868264
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,13 @@ func createWebView(container: UIView, WKSMH: WKScriptMessageHandler, WKND: WKNav
webView.customUserAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.0 Mobile/15E148 Safari/604.1";
webView.scrollView.contentInsetAdjustmentBehavior = .never
webView.addObserver(NSO, forKeyPath: #keyPath(WKWebView.estimatedProgress), options: NSKeyValueObservingOptions.new, context: nil)


#if DEBUG
if #available(iOS 16.4, *) {
webView.isInspectable = true
}
#endif

return webView
}

Expand Down

0 comments on commit 2868264

Please sign in to comment.