0

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

1 Answer 1

0

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)
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.