im new in the Swift World. I have a big problem ... I've tried to write an app that has only one WKWebView. It is like a web browser. The app should be able to fill die LogIn Fields automatically from an object or a list. But for test reasons i have put the login data into variables.
class ViewController: UIViewController , WKNavigationDelegate{
// Zugänge
let pw : String = "test"
let bn : String = "test@test.com"
// Adresse
let adresse : String = "https://www.facebook.com"
var webView: WKWebView!
func webView(webView: WKWebView, didFinishNavigation navigation: WKNavigation!) {
title = webView.title
}
override func loadView() {
webView = WKWebView()
webView.navigationDelegate = self
view = webView
}
override func viewDidLoad() {
super.viewDidLoad()
let url = NSURL(string: adresse)!
webView.loadRequest(NSURLRequest(URL: url))
webView.allowsBackForwardNavigationGestures = true
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
i think this is possible with JS but i don't know how.
Is there any way so solve my Problem?
This is actually doable using 1Password
Add the extension files:
Then include them using a bridging header:
Finally, you can use the following in your project
Here is the link to the 1Password
Here is the reference
or you can simply try like this