iOS uiwebview load request 出错

2016-04-25 12:53:46.464 TestWebView[12473:263632] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802)

2016-04-25 12:53:46.470 TestWebView[12473:263458] Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSURLErrorFailingURLPeerTrustErrorKey=<SecTrustRef: 0x7ff734203bb0>, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, NSUnderlyingError=0x7ff731cb0970 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSErrorFailingURLStringKey=https://m.baidu.com/, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFNetworkCFStreamSSLErrorOriginalValue=-9802, kCFStreamPropertySSLPeerCertificates=<CFArray 0x7ff731caa4f0 [0x10b407a40]>{type = immutable, count = 3, values = (

0 : <cert(0x7ff734201bd0) s: baidu.com i: VeriSign Class 3 International Server CA - G3>

1 : <cert(0x7ff734202000) s: VeriSign Class 3 International Server CA - G3 i: VeriSign Class 3 Public Primary Certification Authority - G5>

2 : <cert(0x7ff7342030e0) s: VeriSign Class 3 Public Primary Certification Authority - G5 i: Class 3 Public Primary Certification Authority>

)}, _kCFStreamPropertySSLClientCertificateState=0, kCFStreamPropertySSLPeerTrust=<SecTrustRef: 0x7ff734203bb0>, NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., _kCFStreamErrorDomainKey=3, NSErrorFailingURLKey=https://m.baidu.com/, _kCFStreamErrorCodeKey=-9802}}, NSErrorPeerCertificateChainKey=<CFArray 0x7ff731caa4f0 [0x10b407a40]>{type = immutable, count = 3, values = (

0 : <cert(0x7ff734201bd0) s: baidu.com i: VeriSign Class 3 International Server CA - G3>

1 : <cert(0x7ff734202000) s: VeriSign Class 3 International Server CA - G3 i: VeriSign Class 3 Public Primary Certification Authority - G5>

2 : <cert(0x7ff7342030e0) s: VeriSign Class 3 Public Primary Certification Authority - G5 i: Class 3 Public Primary Certification Authority>

)}, NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made., NSErrorFailingURLKey=https://m.baidu.com/, NSErrorFailingURLStringKey=https://m.baidu.com/, NSErrorClientCertificateStateKey=0}



解决方案 :
App Transport Security Settings   dictionary
Allow Arbitrary Loads   BOOLEAN类型  值为true即可
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值