I want to attach the Safari Debugger to the simulator in a turbo-ios native app. According to this blog post, you need to add the following code
let webView = WKWebView()
if #available(iOS 16.4, *) {
webView.isInspectable = true
}
let session = Session(webView: webView)
Unfortunately, the author does not say where to put this code. I have tried to do this in the class SceneDelegate
as follows
private let webViewConfiguration: WKWebViewConfiguration = {
let configuration = WKWebViewConfiguration()
configuration.applicationNameForUserAgent = " IOS-xyz/1.0"
// Enable inspection for Safari debugger
if #available(iOS 16.4, *) {
configuration.isInspectable = true
}
but this gives an error
Value of type 'WKWebViewConfiguration' has no member 'isInspectable'
So where do I put this code?