在文件开始实现 allowsAnyHTTPSCertificateForHost 方法
@implementation NSURLRequest (NSURLRequestWithIgnoreSSL)
+ (BOOL)allowsAnyHTTPSCertificateForHost:(NSString *)host
{
return YES;
}
@end
本文介绍如何在iOS开发中实现allowsAnyHTTPSCertificateForHost方法,以允许应用接受任何HTTPS证书,这对于某些特定场景下确保应用正常运行至关重要。
在文件开始实现 allowsAnyHTTPSCertificateForHost 方法
@implementation NSURLRequest (NSURLRequestWithIgnoreSSL)
+ (BOOL)allowsAnyHTTPSCertificateForHost:(NSString *)host
{
return YES;
}
@end
被折叠的 条评论
为什么被折叠?