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

3、如图所示,,然后运行程序。等一会就好了。
时间:2026-02-18 08:43:52
1、首先找到appdelegate.m文件,找到@end
2、在@end下面敲入如下代码。
@implementation NSURLRequest(DataController)
+ (BOOL)allowsAnyHTTPSCertificateForHost:(NSString *)host
{
return YES;
}
@end

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