Ios “网络化”;未定义的建筑符号i386“;错误

Ios “网络化”;未定义的建筑符号i386“;错误,ios,iphone,objective-c,Ios,Iphone,Objective C,我已将所有AFNetworking库文件添加到我的项目(从github下载)。我没有在我的应用程序中创建任何其他视图控制器/类等。我刚刚构建了我的应用程序,发现了9个错误“未定义的架构符号”。任何帮助都将不胜感激 我列出了错误清单 Undefined symbols for architecture i386: "_SecCertificateCopyData", referenced from: -[AFURLConnectionOperation connection:willSendRe

我已将所有AFNetworking库文件添加到我的项目(从github下载)。我没有在我的应用程序中创建任何其他视图控制器/类等。我刚刚构建了我的应用程序,发现了9个错误“未定义的架构符号”。任何帮助都将不胜感激

我列出了错误清单

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
“\u SecTrustGetCertificateCount”,引用自AFURLConnectionOperation.o中的:-[AFURLConnectionOperation连接:willSendRequestForAuthenticationChallenge:]

ld:未找到架构i386的符号
叮当声:错误:链接器命令失败,退出代码为1(使用-v查看调用)

如果要在项目中添加AFNetworking的文件,请确保为项目的目标Membership选择了
AFNetworking.m

您可以通过打开AFNetworking.m文件并在文件检查器中为您的项目目标勾选目标成员身份来修复它

还要确保在项目中包含所有相关的框架,以使AFNetworking正常工作。 i、 系统配置,安全框架。

包括“安全”框架。那么一切都好了


干杯

我认为您需要在iOS项目中添加
Security.framework


我也面临同样的问题,但现在我发现了自己的错误。 如果您面临类似问题,请检查是否添加了以下框架

  • 安全框架
  • SystemConfiguration.framework
  • MobileCoreServices.framework

  • 您是否包括了系统配置、安全性和MobileCorervice框架?我认为您需要添加
    SystemConfiguration.Framework
    在您的iOS项目中只需添加安全性框架我刚刚添加了安全性和MobileCorervice框架,我的应用程序现在运行良好。你应该接受解决你问题的问题。
    Sec
    不是
    SC
    。OP想要的框架是安全性,而不是系统配置。@H2CO3哦,我的错误,我应该投否决票。非常感谢。我也会更新它。-1这是错误的,请看错误消息。并不是其他文件找不到
    AFNetworking.m
    中定义的符号。确切地说,
    AFNetworking.m
    的方法引用了
    Security.framework
    的函数,所以这并不能解决问题。