I am developing a iPhone/iPad browser using WkWebView. It works fine in iOS 8, compiled in Xcode 6.4. When i tested the same app in iOS 9 beta , all the https sites (say google.com, Youtube.com) did not get loaded.

When i debugged it, found that there was a callback to WKNavigationDelegate - didReceiveAuthenticationChallenge method. The authenticationmethod from challenge's protectionspace is NSURLAuthenticationMethodServerTrust, which was not handled. So, obviously the request was cancelled and page was not loaded.

My question is, why WkWebview get authentication challenge callback for https sites in iOS 9 beta alone but not in iOS 8?

I also compiled the source code in Xcode 7 beta 6 and ran in iOS 9 beta device. I also updated info.plist with NSAppTransportSecurity with NSAllowArbitaryLoads to yes to allow http sites.
But still https sites did not get loaded. Same callback problem was reported here also.

Is there any update in WkWebview in iOS 9 beta related to my issue?

1

There are 1 best solutions below

1
On

Why WkWebview get authentication challenge callback for https sites in iOS 9 beta alone but not in iOS 8

Because in iOS9, Apple added support for server certificate validation, which is triggered via the same callback.