17

I'm trying to update to the latest version of Flurry, from 4.2.2 to 4.2.3. I've updated the files, but now I'm getting all sorts of linking errors.

    Undefined symbols for architecture i386:
  "_SecItemAdd", referenced from:
      -[FlurryKeychainWrapper setData:forKey:] in libSDLibrary.a(libFlurry.a-i386-master.o)
  "_SecItemCopyMatching", referenced from:
      -[FlurryKeychainWrapper dataForKey:] in libSDLibrary.a(libFlurry.a-i386-master.o)
  "_SecItemDelete", referenced from:
      -[FlurryKeychainWrapper removeObjectForKey:] in libSDLibrary.a(libFlurry.a-i386-master.o)
  "_SecItemUpdate", referenced from:
      -[FlurryKeychainWrapper updateValueData:forKey:] in libSDLibrary.a(libFlurry.a-i386-master.o)
  "_kSecAttrAccessible", referenced from:
      -[FlurryKeychainWrapper setData:forKey:] in libSDLibrary.a(libFlurry.a-i386-master.o)
  "_kSecAttrAccessibleWhenUnlocked", referenced from:
      -[FlurryKeychainWrapper setData:forKey:] in libSDLibrary.a(libFlurry.a-i386-master.o)
  "_kSecAttrAccount", referenced from:
      -[FlurryKeychainWrapper setupSearchForKey:] in libSDLibrary.a(libFlurry.a-i386-master.o)
  "_kSecAttrGeneric", referenced from:
      -[FlurryKeychainWrapper setupSearchForKey:] in libSDLibrary.a(libFlurry.a-i386-master.o)
  "_kSecAttrService", referenced from:
      -[FlurryKeychainWrapper setupSearchForKey:] in libSDLibrary.a(libFlurry.a-i386-master.o)
  "_kSecClass", referenced from:
      -[FlurryKeychainWrapper setupSearchForKey:] in libSDLibrary.a(libFlurry.a-i386-master.o)
  "_kSecClassGenericPassword", referenced from:
      -[FlurryKeychainWrapper setupSearchForKey:] in libSDLibrary.a(libFlurry.a-i386-master.o)
  "_kSecMatchLimit", referenced from:
      -[FlurryKeychainWrapper dataForKey:] in libSDLibrary.a(libFlurry.a-i386-master.o)
  "_kSecMatchLimitOne", referenced from:
      -[FlurryKeychainWrapper dataForKey:] in libSDLibrary.a(libFlurry.a-i386-master.o)
  "_kSecReturnData", referenced from:
      -[FlurryKeychainWrapper dataForKey:] in libSDLibrary.a(libFlurry.a-i386-master.o)
  "_kSecValueData", referenced from:
      -[FlurryKeychainWrapper setData:forKey:] in libSDLibrary.a(libFlurry.a-i386-master.o)
      -[FlurryKeychainWrapper updateValueData:forKey:] in libSDLibrary.a(libFlurry.a-i386-master.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

It's rather frustrating to say the least. I've included the SystemConfiguration framework (as mentioned here). I'm running xCode 4.6.3. Any ideas on where else the problem could lie?

Community
  • 1
  • 1
SD_Guru
  • 339
  • 3
  • 10

1 Answers1

42

You need to add Security.framework because the symbols mentioned in the linker error are from that framework.


From Flurry update page

How do I update?

Download the latest version of Flurry’s SDK (version 4.2.3) here. Include Apple’s Security Framework in your build process. (see the FAQ entry below for details on how to do this)

Is the "Security" framework mandatory?

To ensure the integrity of your data, Flurry requires that you include this framework in your updated app.

Amar
  • 13,202
  • 7
  • 53
  • 71
  • @SD_Guru Did this help? If yes, you can mark as accepted answer so that your question gets removed from the "Unanswered" list. – Amar Sep 13 '13 at 11:03
  • I've added the Security framework as well, to no avail unfortunately. – SD_Guru Sep 13 '13 at 13:45
  • @SD_Guru Adding the `Security.framework` should resolve these errors for sure. Are you creating any library/framework which uses this flurry library or just adding the flurry lib to an app? I see the errors mention `libSDLibrary.a`. – Amar Sep 13 '13 at 14:29
  • @SD_Guru Make sure that the application which uses your `libSDLibrary.a` should also link to all the frameworks your library is linking including `Security.framework`. – Amar Sep 13 '13 at 14:31
  • 1
    That did it, Amar! Yes, it was a nested library problem with the final application not linking to the security framework. Thanks so much! – SD_Guru Sep 13 '13 at 20:43
  • yes... right... worked for me after adding security frame work +1 @Amar – Babul Sep 25 '13 at 09:26
  • You saved my day. Don't know how I missed that. – Mark Jan 17 '14 at 14:59
  • Does this mean we now need to mention our apps 'contain encryption' when uploading them to apple? – Charlie S Oct 29 '14 at 16:24