FacebookSDK and Bolts conflicting each other (duplicate symbols) on build

喜夏-厌秋 提交于 2019-11-27 20:03:25
Alex

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>

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!

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
Simon Bøgh

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

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

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!