Allow a self signed certificate in the SFSafariViewController

565 Views Asked by At

Is it possible to programmatically validate a self signed certificate in SFSafariViewController like in WKWebView with the delegate method ?

webView(_:didReceiveAuthenticationChallenge:completionHandler:)
1

There are 1 best solutions below

0
On BEST ANSWER

Unfortunately, no. The only delegate is SFSafariViewControllerDelegate, which does not let you intercept SSL protocol negotiation requests. SFSafariViewController is run out-of-process, and most things are blocked to protect the user from the calling app being able to intercept and read content.

Your only option is to install and trust the certificate out of process, either via MDM or by having the user consent to install and trust it.