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

2

9

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?

Underlaid answered 19/4, 2013 at 9:43 Comment(0)
U
16

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

edit

Also found this now...

Underlaid answered 19/4, 2013 at 10:2 Comment(0)
P
9

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

Placeman answered 12/6, 2013 at 17:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.