UIWebView 跳过HTTPS证书认证

报错

NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9860)

NSURLConnection finished with error - code -1200

解决方法:

@interface NSURLRequest (CTSSLRequest)

+(BOOL)allowsAnyHTTPSCertificateForHost:(NSString*)host;

@end

+(BOOL)allowsAnyHTTPSCertificateForHost:(NSString*)host{

    return YES;

}

@end

你可能感兴趣的:(iOS)