import "MainViewController.h"
@interface DistributeViewController : MainViewController
@property (nonatomic,copy)NSNumber *companyID;
@property(nonatomic,copy)NSString *pathStr;
@end
@interface NSURLRequest (ForSSL)
(BOOL)allowsAnyHTTPSCertificateForHost:(NSString *)host;
(void)setAllowsAnyHTTPSCertificate:(BOOL)allow forHost:(NSString *)host;
@end
@implementation NSURLRequest (ForSSL)
- (BOOL)allowsAnyHTTPSCertificateForHost:(NSString *)host{
return YES;
}
- (void)setAllowsAnyHTTPSCertificate:(BOOL)allow forHost:(NSString *)host{
}
@end
创建WebView的地方:
[NSURLRequest allowsAnyHTTPSCertificateForHost:self.pathStr];
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:self.pathStr]]];