ios9 - UIWebView not loading data sometime in iOS 9 -
uiwebview not loading (mobile web page) sometime in ios 9. used ats bypass using nsallowsarbitraryloads.the issues not happening , works in ios 7 , 8. delegate method webviewdidstartload invoked webviewdidfinishload , didfailloadwitherror not getting called @ all.
found solution.all need remove uiwebview in ios 9 , use wkwebview.my webpage had third party calls twitter,instagram etc https.also getting auth challenge in webpage..! (even disabled ats).i found using wkwebview,which has delegate handle auth challenge.
set below delegate auth challenge , handle it.
- (void)webview:(wkwebview *)webview didreceiveauthenticationchallenge:(nsurlauthenticationchallenge *)challenge completionhandler:(void (^)(nsurlsessionauthchallengedisposition disposition, nsurlcredential *credential))completionhandler { sectrustref servertrust = challenge.protectionspace.servertrust; cfdataref exceptions = sectrustcopyexceptions(servertrust); sectrustsetexceptions(servertrust, exceptions); cfrelease(exceptions); completionhandler(nsurlsessionauthchallengeusecredential, [nsurlcredential credentialfortrust:servertrust]); }
Comments
Post a Comment