I want to allow invalid SSL certificates. My main code is below:
myClient = [[MyClient alloc] init];
[myClient getHtml:@\"/path/to/the/distination.html\"];
<
I encountered the same problem and no one of the solutions that I read works.
For me the only workaround is set the AFSecurityPolicy like this:
AFSecurityPolicy *securityPolicy = [AFSecurityPolicy policyWithPinningMode:AFSSLPinningModeNone];
securityPolicy.allowInvalidCertificates = YES;
manager.securityPolicy = securityPolicy;
I decided to reply although the question is old, maybe can help someone.