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

前端 未结 5 1514
一整个雨季
一整个雨季 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条回答
  •  猫巷女王i
    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 #import

提交回复
热议问题