31

Not sure what is the problem.. 91 symbols found duplicated for armv7

Am on a Swift project targeting iOS 7.1.

Both frameworks are of the latest versions.

Tried cleaning project and removing derived data., but to no avail.

duplicate symbol _OBJC_IVAR_$_BFAppLinkTarget._URL in:
    /Users/rynecheow/Development/THPopQuiz/Frameworks/FacebookSDK.framework/FacebookSDK(BFAppLinkTarget.o)
    /Users/rynecheow/Development/THPopQuiz/Frameworks/Bolts.framework/Bolts(BFAppLinkTarget.o)
duplicate symbol _OBJC_IVAR_$_BFAppLinkTarget._appStoreId in:
    /Users/rynecheow/Development/THPopQuiz/Frameworks/FacebookSDK.framework/FacebookSDK(BFAppLinkTarget.o)
    /Users/rynecheow/Development/THPopQuiz/Frameworks/Bolts.framework/Bolts(BFAppLinkTarget.o)
duplicate symbol _OBJC_IVAR_$_BFAppLinkTarget._appName in:
    /Users/rynecheow/Development/THPopQuiz/Frameworks/FacebookSDK.framework/FacebookSDK(BFAppLinkTarget.o)
    /Users/rynecheow/Development/THPopQuiz/Frameworks/Bolts.framework/Bolts(BFAppLinkTarget.o)
Fabian N.
  • 3,807
  • 2
  • 23
  • 46
Ryne Cheow
  • 667
  • 2
  • 8
  • 13

5 Answers5

51

I had the same issue with the 91 duplicates. What worked for me was simply to remove the Bolts.framework which seems to be somehow already included in Facebook new SDK.

Hope it helps!

winterized
  • 3,324
  • 3
  • 19
  • 21
  • 1
    Worked for me too, thanks! Related: you happen to be using Parse, Parse automatically #include's the Facebook SDK, so you don't need to reference both Parse+Facebook in your bridging file. – Kip Oct 25 '14 at 06:25
  • Yep, Bolts framework is redundant if using the Facebook SDK in your project. – Paul Nov 14 '14 at 00:04
  • I have the same issue however I am trying to use AWS SDK and Facebook and it seems they are conflicting again :( any ideas? – Omar Sultan Feb 26 '15 at 13:25
  • 11
    I've tried that but now I'm getting "symbol not defined" errors. Undefined symbols for architecture arm64: "_BFTaskMultipleExceptionsException", referenced from: ___53+[PFObject(Private) deleteAllAsync:withSessionToken:]_block_invoke214 in Parse(PFObject.o) ___65+[PFObject(Private) _deepSaveAsync:withCurrentUser:sessionToken:]_block_invoke311 in Parse(PFObject.o) ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) – Leo Flaherty Mar 06 '15 at 12:36
  • 1
    I have same issue as Leo Flaherty. Any ideas? – mirap Mar 06 '15 at 16:35
  • I removed the Bolts.framework because of the duplicate symbols but how to use the classes of Bolts.framework now? They don't seem to be included in the FacebookSDK.framework – Vishwani Mar 09 '15 at 21:32
  • 1
    I have the same problem as @LeoFlaherty as well. Anyone solved this ? – Dani Pralea Mar 14 '15 at 00:48
  • 2
    @Leo Flaherty - To get rid of that error, you can go to your AppDelegate.m file and write this line after your imports: NSString *const BFTaskMultipleExceptionsException = @"BFMultipleExceptionsException"; – Dog May 13 '15 at 18:09
  • OMG! @AndreiBouariu thank you so much dude. I've been trying to get rid of that error for hours! That works! – C0D3 Jun 03 '15 at 21:27
17

Had the same issue.

  • Removing the Bolts.framework was NOT a solution since I get the errors that Leo Flaherty mentioned (comment in the accepted answer).
  • Using the solution mentioned by iOS_DEV seems like an ugly hack to me.
  • Using the latest Parse and Facebook SDKs was also NOT a solution (mentioned by Simon Bøgh) since I was using the version 3.x of the Facebook SDK and the latest is 4.x. The Facebook SDK Change log mentions: The Facebook SDK for iOS v4.0 is a major version upgrade. Since I needed to meet a deadline, I couldn't dedicate time on re-writing all my Facebook code, to fit with the new 4.x SDK version.

Solution that I propose:

Instead of adding the Bolts.framework and FacebookSDK.framework as framework to your project, add them as Pods:

pod 'Bolts'
pod 'Facebook-iOS-SDK', '3.23.1'

Find here all the Facebook SDK versions available, in case you need to use one which is not the latest.
In case you're using Swift, you need to add the following in your bridging header:
#import <FacebookSDK/FacebookSDK.h> #import <Bolts/Bolts.h>

Community
  • 1
  • 1
Alex
  • 2,325
  • 3
  • 29
  • 35
  • 1
    This solution was effective for my project with a slightly earlier Facebook iOS SDK version of 3.19. It is of note that I chose to forgo adding either framework to my Podfile. This reduced my short term risk, though I intend to migrate these into CocoaPods later. – AWrightIV May 21 '15 at 01:00
  • Any ideas on how to solve the issue with Carthage? @Alex – Jaime Agudo Nov 18 '16 at 09:33
1

This worked for me.

1) I deleted the Bolts.framework that came with parse.

2) Added only parse (selecting copy into destination folder) & facebookSDK (unchecking copy into destination folder). Also checked Framework search path in Build Settings.

3) Added NSString *const BFTaskMultipleExceptionsException = @"BFMultipleExceptionsException";

in AppDelegate.m before

@interface AppDelegate ()

@end
iOS_DEV
  • 921
  • 6
  • 15
1

I know an answer has already been accepted, but this has now been resolved by Facebook.

If you download the latest Parse SDK (1.7.0) and Facebook SDK (4.0.0) as of this writing, it should work just fine. Both SDKs were updated just hours ago.

I have imported and copied Bolts.framework and Parse.framework from the Parse SDK, and then linked to Facebooks SDK (now called FBSDKCoreKit.framework), and it successfully builds the project.

Duplicate question: Parse and facebook sdk -duplicate symbol

Community
  • 1
  • 1
Simon Bøgh
  • 801
  • 8
  • 13
  • 2
    I'm using Parse SDK (1.7.1) and Facebook SDK (4.0.1) and I've got the same issue back with 92 duplicate symbols showing up. The problem is between Bolts.framework and FacebookSDK.framework. I'm not sure why I'm having this problem. I've removed references to both frameworks and then brought them both back in. Cleaned the project and it still won't build. Do you have any suggestions? – flite3 Apr 22 '15 at 07:33
  • 1
    UPDATE! I'm using xcode 7 Beta 2 with parse 1.7.5 and facebook 4.2.0. The problem still persists. – Bruno Jun 26 '15 at 12:42
  • I'm using only latest FBSDK (version i don't know but name on zip file is 20150910) though getting 197 duplicate symbols error – Mrugesh Tank Sep 12 '15 at 06:17
-1

Follow these step: applicatonTarget-> Build Phase-> expend Compile sources.

Here, you need to remove those file that causes duplicate symbol error. Then build again. enter image description here

Deepak
  • 1,421
  • 1
  • 16
  • 20
  • This isn't the problem I guess. I've triple checked this =/ – Ryne Cheow Sep 15 '14 at 04:18
  • Is BFAppLinkTarget.m shows in Compile Sources section? – Deepak Sep 15 '14 at 04:25
  • It looks as though you have the source file included directly into your project as well as having a link to the library. You should choose one or the other (probably the library). – Deepak Sep 15 '14 at 04:27