Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upgrade from Facebook iOS SDK 3.2.1 to 3.5 gave me an error with FBCrypto

After installing the new sdk I cleaned the project and build it. It fails with this message:

Undefined symbols for architecture i386: "_SecRandomCopyBytes", referenced from: +[FBCrypto randomBytes:] in FacebookSDK(FBCrypto.o) -[FBCrypto encrypt:additionalDataToSign:] in FacebookSDK(FBCrypto.o) "_kSecRandomDefault", referenced from: +[FBCrypto randomBytes:] in FacebookSDK(FBCrypto.o) -[FBCrypto encrypt:additionalDataToSign:] in FacebookSDK(FBCrypto.o) ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation)

Same problem anyone? Solutions?

like image 463
Kasihasi Avatar asked Apr 19 '13 09:04

Kasihasi


2 Answers

Well, you need to include the security framework and the libsqlite3.dylib as stated here. It works now.

edit

Also found this now...

like image 90
Kasihasi Avatar answered Nov 07 '22 07:11

Kasihasi


Jumping on this, im running into the same issue, I saw that the FBSDK needs the Security, AdSupport, etc. Here's my linked libraries:

enter image description here

My error is the same:

Undefined symbols for architecture i386:
  "_SecRandomCopyBytes", referenced from:
      +[FBCrypto randomBytes:] in FacebookSDK(FBCrypto.o)
      -[FBCrypto encrypt:additionalDataToSign:] in FacebookSDK(FBCrypto.o)
  "_kSecRandomDefault", referenced from:
      +[FBCrypto randomBytes:] in FacebookSDK(FBCrypto.o)
      -[FBCrypto encrypt:additionalDataToSign:] in FacebookSDK(FBCrypto.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

All the other framework dependencies are good to go as far as I can tell. A Vlean->Build didn't fix it either. Thanks.

Edit: Got it. I needed to re Add Files to Project and check the Add to Target button.. basically XCode automagicka

like image 23
false_memories Avatar answered Nov 07 '22 05:11

false_memories