UIWebView won't load links with certificate (https:// prefix)

前端 未结 2 456
心在旅途
心在旅途 2020-12-29 00:00

I know this has been asked before but I have looked at every answer (there aren\'t many) and none help me.

The issue I am running into is dealing with certificates

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-29 00:50

    Web view does not load https urls due to certificate mismatch. After writing this extension it would work as expected

    Swift 2.2

      extension NSURLRequest {
            static func allowsAnyHTTPSCertificateForHost(host: String) -> Bool
            {
                return true
            }
        }
    

提交回复
热议问题