IOS 支持HTTPS调用(AFNetWorking框架)
2016-12-08 14:01 xiangjune 阅读(363) 评论(0) 编辑 收藏 举报1.ATS开关开启
2.
manager.securityPolicy.allowInvalidCertificates = YES;
manager.securityPolicy.validatesDomainName = NO;
若是 AFHTTPRequestOperation 调用方式,则:
[operation.securityPolicy setAllowInvalidCertificates:YES];
operation.securityPolicy.validatesDomainName = NO;