Just copy the cer file in your project. In the file AFURLConnectionOperation.m line 215:
NSArray *paths = [bundle pathsForResourcesOfType:@"cer" inDirectory:@"."];
It will automatically assign a cer file.
And make sure Prefix.pch:
#define _AFNETWORKING_PIN_SSL_CERTIFICATES_
and
#define _AFNETWORKING_ALLOW_INVALID_SSL_CERTIFICATES_
if not trusted certificate.
source share