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

前端 未结 5 1361
一整个雨季
一整个雨季 2020-12-05 09:56

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 versi

相关标签:
5条回答
  • 2020-12-05 10:28

    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

    0 讨论(0)
  • 2020-12-05 10:32

    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!

    0 讨论(0)
  • 2020-12-05 10:38

    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
    
    0 讨论(0)
  • 2020-12-05 10:40

    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

    0 讨论(0)
  • 2020-12-05 10:45

    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>

    0 讨论(0)
提交回复
热议问题