22

I keep on getting the following error:

duplicate symbol _llvm.embedded.module in:
/Users/name/Documents/FacebookSDKs-iOS-20150910/FBSDKCoreKit.framework/FBSDKCoreKit(FBSDKApplicationDelegate.o)
/Users/name/Documents/FacebookSDKs-iOS-20150910/FBSDKCoreKit.framework/FBSDKCoreKit(FBSDKServerConfiguration.o)
ld: 102 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I've tried deleting the FBSDK and reinstalling, but that has not work. I also suspect that the fact that I'm bridging the framework into Swift may be the problem. My bridging header contains the following:

#ifndef EggCrush_Bridge_h
#define EggCrush_Bridge_h

#import <FBSDKCoreKit/FBSDKCoreKit.h>

#endif

My AppDelegate.swift file imports FBSDKCoreKit.
There are no other linker flags.
I'm running Xcode 6.3.2 and building a project for iOS 8.3

How to clear this error up?

gnat
  • 6,213
  • 108
  • 53
  • 73
Dan
  • 475
  • 2
  • 5
  • 11

5 Answers5

51

If not mistaken, you are using the sdk which just released by Facebook at September 10th, 2015 which named as FacebookSDKs-iOS-20150910.zip. Try to use sdk that released at August 13th, 2015 which named as FacebookSDKs-iOS-20150813.zip and report to Facebook about the duplication problem if you can. Thank you.

Guan Chuan
  • 671
  • 7
  • 9
  • This works. Make sure to remove any older reference to the 20150910 framework and/or remove the DerivedData cache. – ricardohdz Sep 12 '15 at 18:31
  • This worked for me as well running xcode 6.4 on iOS 8.4 Simulator. Thanks so much – justColbs Sep 13 '15 at 01:39
  • i get this only in simulator :(( – Peter Lapisu Sep 13 '15 at 19:52
  • 1
    Yes this is because the latest one is supported with App Thining. so It would work in Xcode 7 – Mrug Sep 16 '15 at 06:17
  • Is FacebookSDKs-iOS-20150813.zip compatible with iOS9 ? – Renat Gatin Sep 30 '15 at 16:24
  • Yes is works but what is the problem? could you explain me. – utkal patel Oct 13 '15 at 11:37
  • Does FacebookSDKs-iOS-20150813.zip work for iOS 9 as well cause for iOS 9 I changed to FacebookSDKs-iOS-20150910.zip and facing this issue!!!Its compiling for device not simulator. will this be a problem? – Saty Nov 17 '15 at 04:54
  • @It_Does_Not_Matter did you find your answer cause I am facing the same issue, I ca not make the FacebookSDKs-iOS-20150813.zip work with iOS 9, it does not return result!! – Saty Nov 17 '15 at 07:00
25

This thread explains you must compile the Facebook 4.6.0 SDK in Xcode 7 to resolve the issue. After compiling in Xcode 7 it worked for me.

In the Facebook iOS SDK 4.6.0, App Thinning (Bitcode) support has been added and therefore it cannot be complied in Xcode versions lower than Xcode 7.0.

manroe
  • 1,645
  • 20
  • 35
2

When I had a duplicate symbols error, I opened my project.xcodeproj XML file in a text editor and searched the duplicate symbol. You'll most likely find that FacebookSDK shows up in multiple lines with the same "id" property. Make sure you have a back up of your current project, and try deleting the duplicates (ones that have the same id) manually in this file. Save the file, compile, and see if the project runs.

You might want to try just deleting one duplicate line, and seeing if the number of duplicates (apparently you have 102!!) goes down first.

Amy
  • 301
  • 2
  • 9
  • I actually don't see any instances of FacebookSDK. Is it supposed to be there automatically? – Dan Sep 11 '15 at 09:02
2
  1. If you use FacebookSDKs-iOS-20160115.zip and your XCODE VersionXCODE 6.4 or lower version of XCODE then this type of issue create.
  2. FacebookSDKs-iOS-20160115.zip this is use for XCODE 7.
  3. You can use https://developers.facebook.com/resources/FacebookSDKs-iOS-20150813.zip.
  4. Its work fine for you.
Sanandiya Vipul
  • 764
  • 4
  • 16
0

I faced the same issue of duplicate symbols. I was using Xcode 6.4 but later when I upgraded to Xcode 7.0 It Worked fine for me. I would suggest to Upgrade your Xcode to 7.0 if you are using earlier one.