As I debug my app to find why the webview dowsn't receive my messages, I found out that another WkWebview (let's call it B) was created on top of my existing webview (A). Since I only have reference to A, I'm trying to evaluate js directly on B using it's memory address. what is the correct way to do that in lldb?
Based on this answer, I've tried:
settings set target.language swift
e -- import WKWebview
e -- let $webView = unsafeBitCast(0x13299e400, to:WKWebview.self)
in order to call webView.evaluateJavaScript, but lldb says:
let $webView = unsafeBitCast(0x13299e400, to:WKWebview.self)
^
error: <EXPR>:3:46: error: cannot convert value of type 'module<WKWebview>' to expected argument type 'U.Type'
let $webView = unsafeBitCast(0x13299e400, to:WKWebview.self)```