我已将所有AFNetworking库文件添加到我的项目(我从
github下载).我的应用程序中没有创建任何其他视图控制器/类等.我刚刚构建了我的应用程序,发现了9个错误“Undefined symbols for architecture”.任何帮助将不胜感激.
我列出了错误列表.
Undefined symbols for architecture i386: "_SecCertificateCopyData",referenced from: -[AFURLConnectionOperation connection:willSendRequestForAuthenticationChallenge:] in AFURLConnectionOperation.o "_SecCertificateCreateWithData",referenced from:___44+[AFURLConnectionOperation pinnedPublicKeys]_block_invoke in AFURLConnectionOperation.o "_SecPolicyCreateBasicX509",referenced from:___44+[AFURLConnectionOperation pinnedPublicKeys]_block_invoke in AFURLConnectionOperation.o -[AFURLConnectionOperation connection:willSendRequestForAuthenticationChallenge:] in AFURLConnectionOperation.o "_SecTrustCopyPublicKey",referenced from:___44+[AFURLConnectionOperation pinnedPublicKeys]_block_invoke in AFURLConnectionOperation.o -[AFURLConnectionOperation connection:willSendRequestForAuthenticationChallenge:] in AFURLConnectionOperation.o "_SecTrustCreateWithCertificates",referenced from:___44+[AFURLConnectionOperation pinnedPublicKeys]_block_invoke in AFURLConnectionOperation.o -[AFURLConnectionOperation connection:willSendRequestForAuthenticationChallenge:] in AFURLConnectionOperation.o "_SecTrustEvaluate",referenced from:___44+[AFURLConnectionOperation pinnedPublicKeys]_block_invoke in AFURLConnectionOperation.o -[AFURLConnectionOperation connection:willSendRequestForAuthenticationChallenge:] in AFURLConnectionOperation.o "_SecTrustGetCertificateAtIndex",referenced from:-[AFURLConnectionOperation connection:willSendRequestForAuthenticationChallenge:] in AFURLConnectionOperation.o
“_SecTrustGetCertificateCount”,引自: – AFURLConnectionOperation.o中的[AFURLConnectionOperation连接:willSendRequestForAuthenticationChallenge:]
解决方法
我想你需要在iOS项目中添加Security.framework.