I want to allow invalid SSL certificates with AFNetworking

前端 未结 13 737
南笙
南笙 2020-12-02 10:11

I want to allow invalid SSL certificates. My main code is below:

myClient = [[MyClient alloc] init];
[myClient getHtml:@\"/path/to/the/distination.html\"];
<         


        
13条回答
  •  天涯浪人
    2020-12-02 10:44

    In AFNetworking 2.0, you can use the following:

    [AFHTTPRequestOperationManager manager].securityPolicy.allowInvalidCertificates = YES;
    

提交回复
热议问题