“The certificate for this server is invalid.” WKWebView Error handling

(WKWebView, error handling)

透過WKWebView開啟網頁時,
如果無法開啟網頁,且出現下圖訊息

The certificate for this server is invalid. You might be connecting to a server that is pretending to be “…” which could put your confidential information at risk.

可以參考本文

對WKNavigationDelegate寫入下方程式

重新執行即可排除此異常

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store