admob-plus / admob-plus

Trustable AdMob Plugin for Cordova, Capacitor, Ionic, React Native
https://admob-plus.github.io
MIT License
361 stars 150 forks source link

Can't use Cordova version in Capacitor #659

Closed harryt2 closed 1 month ago

harryt2 commented 1 month ago

I keep getting the error: Value of type 'WKWebView' has no member 'engineWebView'

On line 175 of the AMBPlugin.swift file

@objc func webviewGoto(_ command: CDVInvokedUrlCommand) {
        let ctx = AMBContext(command)

        DispatchQueue.main.async {
            if let url = URL(string: ctx.optWebviewGoto()+"#from_webview_goto") {
                let webView = self.webViewEngine.engineWebView as! WKWebView
                webView.load(URLRequest(url: url))
            }
        }
    }

No idea how to fix this.