iOS9 WKWebview didReceiveAuthenticationChallenge called with host null

不打扰是莪最后的温柔 提交于 2021-02-08 06:33:10

问题


I am using WKWebview (iOS 9) to load https://self-signed.badssl.com/

While as a delegate didReceiveAuthenticationChallenge is getting called, I'm receiving incomplete protectionSpace details e.g. host is null & authenticationMethod is NSURLAuthenticationMethodDefault (it should be NSURLAuthenticationMethodServerTrust)

po challenge.protectionSpace
<NSURLProtectionSpace: 0x7ff30c40fb90>: Host:(null), Server:http, Auth-Scheme:NSURLAuthenticationMethodDefault, Realm:(null), Port:0, Proxy:NO, Proxy-Type:(null)

Surprisingly if I'm writing fresh code as a new project(rather than writing in my mail project), the same code is working perfectly. So as I'm guessing this could be related to some settings.

Note: For both the code instances, ATS is set to true.

<key>NSAppTransportSecurity</key>
<dict>
  <key>NSAllowsArbitraryLoads</key>
  <true/>
  </dict>

Can anyone help?

Thanks in advance.


回答1:


Resolved: It was due to another Third Party Library which was causing this issue.



来源:https://stackoverflow.com/questions/38442741/ios9-wkwebview-didreceiveauthenticationchallenge-called-with-host-null

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!