ios webview加载https网址
1、首先找到appdelegate.m文件,找到@end
2、在@end下面敲入如下代码。
@implementation NSURLRequest(DataController)
+ (BOOL)allowsAnyHTTPSCertificateForHost:(NSString *)host
{
return YES;
}
@end

3、如图所示,,然后运行程序。等一会就好了。
阅读量:79
阅读量:82
阅读量:20
阅读量:86
阅读量:90
1、首先找到appdelegate.m文件,找到@end
2、在@end下面敲入如下代码。
@implementation NSURLRequest(DataController)
+ (BOOL)allowsAnyHTTPSCertificateForHost:(NSString *)host
{
return YES;
}
@end

3、如图所示,,然后运行程序。等一会就好了。