I have an ios app built from gonative.io (essentially they use a webview to load in the app a website content). I'm trying to call a javascript function to set username and password (or set them directly from the ios oproject) if the user already logged in. Anyone know how can I do that? Thanks a lot.
1 Answer
You can use WKWebview's evaluateJavaScript. You also can refer my post here.
self.wk.evaluateJavaScript("var rect = document.getElementById('movie').getBoundingClientRect(); [rect.x, rect.y, rect.width, rect.height, rect.top, rect.right, rect.bottom, rect.left];") { (result, error) -> Void in
print(result)
}