From 6b2515d8c0f43cc06babbc1fcbd4cc15e9ef0a53 Mon Sep 17 00:00:00 2001 From: Paul Melnikow Date: Mon, 12 Aug 2013 00:15:49 -0400 Subject: [PATCH] When AFNetworking is in an embedded framework, load certificates from app bundle --- AFNetworking/AFURLConnectionOperation.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AFNetworking/AFURLConnectionOperation.m b/AFNetworking/AFURLConnectionOperation.m index 4498513..6de15a6 100644 --- a/AFNetworking/AFURLConnectionOperation.m +++ b/AFNetworking/AFURLConnectionOperation.m @@ -200,7 +200,7 @@ static BOOL AFSecKeyIsEqualToKey(SecKeyRef key1, SecKeyRef key2) { static NSArray *_pinnedCertificates = nil; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ - NSBundle *bundle = [NSBundle bundleForClass:[self class]]; + NSBundle *bundle = [NSBundle mainBundle]; NSArray *paths = [bundle pathsForResourcesOfType:@"cer" inDirectory:@"."]; NSMutableArray *certificates = [NSMutableArray arrayWithCapacity:[paths count]];