I added AFNetworking 2.0 to my project. I did it without the use CocoaPods - I just added the files to the project, making sure to copy the files to target.
When I try to compile the project I get the following error:
Undefined symbols for architecture i386:
"_SecCertificateCopyData", referenced from:
_AFCertificateTrustChainForServerTrust in AFSecurityPolicy.o
"_SecCertificateCreateWithData", referenced from:
_AFPublicKeyForCertificate in AFSecurityPolicy.o
"_SecPolicyCreateBasicX509", referenced from:
_AFPublicKeyForCertificate in AFSecurityPolicy.o
_AFPublicKeyTrustChainForServerTrust in AFSecurityPolicy.o
"_SecTrustCopyPublicKey", referenced from:
_AFPublicKeyForCertificate in AFSecurityPolicy.o
_AFPublicKeyTrustChainForServerTrust in AFSecurityPolicy.o
"_SecTrustCreateWithCertificates", referenced from:
_AFPublicKeyForCertificate in AFSecurityPolicy.o
_AFPublicKeyTrustChainForServerTrust in AFSecurityPolicy.o
"_SecTrustEvaluate", referenced from:
_AFPublicKeyForCertificate in AFSecurityPolicy.o
_AFServerTrustIsValid in AFSecurityPolicy.o
_AFPublicKeyTrustChainForServerTrust in AFSecurityPolicy.o
"_SecTrustGetCertificateAtIndex", referenced from:
_AFCertificateTrustChainForServerTrust in AFSecurityPolicy.o
_AFPublicKeyTrustChainForServerTrust in AFSecurityPolicy.o
"_SecTrustGetCertificateCount", referenced from:
_AFCertificateTrustChainForServerTrust in AFSecurityPolicy.o
_AFPublicKeyTrustChainForServerTrust in AFSecurityPolicy.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
What is wrong with my project?
Your missing iOS frameworks in the project. I bet security framework is one of them from the names I see.
#import <Security/Security.h>
in your PCH file + make sure the library is in "Link Binary With Libraries".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With