1

first of all: I am quite new to Swift, so please have mercy if my question is stupid as hell.

What I want to do:

Create an app, that just displays a website. I did this with a basic WKWebView with Swift 3.

import UIKit
import WebKit

class ViewController: UIViewController, WKNavigationDelegate {

    var webView: WKWebView!

    override func loadView() {
        webView = WKWebView()            
        webView.navigationDelegate = self
        view = webView
    }

    override func viewDidLoad() {
        super.viewDidLoad()

        let url = URL(string:"https://www.google.com/")
        webView.load(URLRequest(url: url))
        webView.allowsBackForwardNavigationGestures = true    
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
    }

}

This works fine with e.g. https://www.google.com.

My problem is, that the website I want to visit requires a certificate (certificate.p12) from the user in order to authenticate.

Unfortunatelly I have no idea how I can achieve this. So any hint will be greatly appreciated!

Thanks a lot :)

Chaya93
  • 21
  • 1