Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

APPLE MACH-O LINKED ERROR After adding AFNetworking

Just adding AFNetworking into my project, and after B&R here i got this error like:

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", referenced from:
  -[AFURLConnectionOperation connection:willSendRequestForAuthenticationChallenge:] in AFURLConnectionOperation.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Have already checked framework,libs and compile source, or re-add AFURLConnection.m, it won't work either.

Can anyone please help me out? thanks a lot...

like image 622
jokerdc Avatar asked Aug 02 '13 16:08

jokerdc


2 Answers

You need to add the Security.framework in order for it to build.

like image 200
Cody Gray Avatar answered Nov 18 '22 14:11

Cody Gray


For mine, I have to add

  • Security.framework
  • SystemConfiguration.framework
  • MobileCoreServices.framework
like image 41
LENG UNG Avatar answered Nov 18 '22 14:11

LENG UNG