Undefined symbols for architecture x86_64:
"_SecCertificateCopyData", referenced from:
_AFCertificateTrustChainForServerTrust in AFSecurityPolicy.o
"_SecCertificateCreateWithData", referenced from:
_AFPublicKeyForCertificate in AFSecurityPolicy.o
-[AFSecurityPolicy evaluateServerTrust:forDomain:] in AFSecurityPolicy.o
"_SecPolicyCreateBasicX509", referenced from:
_AFPublicKeyForCertificate in AFSecurityPolicy.o
-[AFSecurityPolicy evaluateServerTrust:forDomain:] in AFSecurityPolicy.o
_AFPublicKeyTrustChainForServerTrust in AFSecurityPolicy.o
"_SecPolicyCreateSSL", referenced from:
-[AFSecurityPolicy evaluateServerTrust:forDomain:] 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
"_SecTrustSetAnchorCertificates", referenced from:
-[AFSecurityPolicy evaluateServerTrust:forDomain:] in AFSecurityPolicy.o
"_SecTrustSetPolicies", referenced from:
-[AFSecurityPolicy evaluateServerTrust:forDomain:] in AFSecurityPolicy.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
基于Xcode7 在使用AFNetworking 时的报错 12个
只需要添加一个Security.framework 就可以了。
网友评论