Xcode7 使用AFNetWorking 報錯 添加Security.framework

Undefined symbols for architecture x86_64:lua

  "_SecCertificateCopyData", referenced from:code

      _AFCertificateTrustChainForServerTrust in AFSecurityPolicy.oci

  "_SecCertificateCreateWithData", referenced from:it

      _AFPublicKeyForCertificate in AFSecurityPolicy.oio

      -[AFSecurityPolicy evaluateServerTrust:forDomain:] in AFSecurityPolicy.oclass

  "_SecPolicyCreateBasicX509", referenced from:rust

      _AFPublicKeyForCertificate in AFSecurityPolicy.ocommand

      -[AFSecurityPolicy evaluateServerTrust:forDomain:] in AFSecurityPolicy.oerror

      _AFPublicKeyTrustChainForServerTrust in AFSecurityPolicy.oarchitecture

  "_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 就能夠了。

相關文章
相關標籤/搜索