我已將所有AFNetworking庫文件添加到我的項目(我從github下載)。我沒有在我的應用程序中創建任何其他視圖控制器/類等。我剛建立我的應用程序,發現9個錯誤「未定義的架構符號」。任何幫助,將不勝感激。AFNetworking「架構i386的未定義符號」錯誤
我列出了錯誤列表。
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連接:willSendRequestForAuthenticationChallenge:]在AFURLConnectionOperation.o
LD:符號(多個)未找到i386硬件架構 鐺:錯誤:連接器命令失敗退出代碼1(使用-v查看調用)
你包括SystemConfiguration,安全性和MobileCoreService框架? – CarlJ
我想你需要在你的iOS項目中添加'SystemConfiguration.Framework' – Buntylm
只需添加安全框架 – Saify