Save username and password with Webkit

My application uses a simple UIViewController to call a safari webpage. Unfortunately, after the user inputs their username and password, keychain/safari does not save the information.


I have made adjustments in the capabiliites section of xcode but this does not seem like enought.


Below is my very basic code,



class ViewController: UIViewController {


    @IBOutlet weak var webview: WKWebView!

    override func viewDidLoad() {



        // Do any additional setup after loading the view, typically from a nib.


        let url = URL(string: “”) //taken out for privacy

        let request = URLRequest(url: url!)







Should I include something within this class? Any help is appreciated.

Powered by WPeMatico

You may also like...

Comments are closed.