iosfacebook-ios-sdkbolts-framework

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


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)

Solution

  • Had the same issue.

    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>