ios – AFNetworking“i386架构的未定义符号”错误

前端之家收集整理的这篇文章主要介绍了ios – AFNetworking“i386架构的未定义符号”错误前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我已将所有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:]

ld:没有找到符合i386架构的符号
clang:错误链接器命令失败,退出代码1(使用-v查看调用)

解决方法

我想你需要在iOS项目中添加Security.framework.
原文链接:https://www.f2er.com/iOS/336069.html

猜你在找的iOS相关文章