in UiWebView - NSURLConnection/CFURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -108)
Solution 1
If you put this anywhere in your code the app will bypass certificate validation:
@implementation NSURLRequest(DataController)
+(BOOL)allowsAnyHTTPSCertificateForHost:(NSString *)host
{
return YES;
}
@end
Solution 2
Facebook have https
protocol in URL.
Loading a https
url in UIWebview
in different from loading the normal https
url.
And to load https
URL please have a look at loading-https-url-in-uiwebview and this SO Post 1 and SO Post 2 here.
It may help you.
DharaParekh
IOS (iPhone / iPad) Application developer. I like works on Objective-C and Swift language.
Updated on June 05, 2022Comments
-
DharaParekh almost 2 years
When I open a link in UIWebView and click on facebook icon of content of that URL it gives the following error
2014-01-09 13:15:14.412 AppName[2067:5407] CFNetwork SSLHandshake failed (-108) 2014-01-09 13:15:14.412 AppName[2067:5407] CFNetwork SSLHandshake failed (-108) 2014-01-09 13:15:15.063 AppName[2067:5407] CFNetwork SSLHandshake failed (-108) 2014-01-09 13:15:15.064 AppName[2067:5407] NSURLConnection/CFURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -108)
I also search this error in google But no result found for -108. results found for 98*
and this same link same process works in safari and also in other app UIWebView. but I take new project for second app and put this link in UIWebView, It gives error.
Please Help and Thanks in Advance.