0

Here is the error:

duplicate symbol _OBJC_METACLASS_$_BFAppLinkReturnToRefererView in:
    /Users/User/Documents/FacebookSDK/FacebookSDK.framework/FacebookSDK(BFAppLinkReturnToRefererView.o)
    /Users/User/Desktop/Project/Project/Project/Assets/Facebook/Editor/iOS/FacebookSDK/FacebookSDK.a(BFAppLinkReturnToRefererView.o)
ld: 889 duplicate symbols for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I have searched to find the solution of this error but i couldn't. There are tons of similar error like this, but this one hasn't been asked by someone yet. This problem shows up when i add "-ObjC" to the "Other Linker Flags". I need to add it to use Admob service. What could be the problem? How can i solve this?

  • Find the library that contains that class (`BFAppLinkReturnToRefererView`) and remove it from the libraries to link against. The issue is that multiple object files provide that same class. Using `-ObjC` is very dangerous and you might want to investigate `-force_load` instead. See [my question](http://stackoverflow.com/questions/25889914/can-the-objc-flag-be-applied-selectively-to-static-libraries) for details. – trojanfoe Oct 30 '14 at 14:53
  • I've tried to find `BFAppLinkReturnToRefererView` but i couldn't. There is no such a class in library. I tried to use `-force_load` but i get this error `-stdlib=libstdc++` what do i need to do next? Thanks for help. – bekiryanik Oct 30 '14 at 15:30
  • I found this file `BFAppLinkReturnToRefererView` and removed it. Still same issue. :) – bekiryanik Oct 30 '14 at 15:51

1 Answers1

0

I faced the same issue while integrating Facebook-ios-sdk. It was because I was using another third party library which also had Bolts.framework linked against it. The solution I found was to incorporate the facebook-ios-sdk from the source code hosted on Github. Link: https://github.com/facebook/facebook-ios-sdk Clone this repo on your system and open facebook-ios-sdk.xcodeproj in src directory, build phases tab, and change the 'Required' field to 'Optional'. Run the script build_framework.sh from scripts directory, integrate the newly created FacebookSDK.framework from in build directory into your project.

Same process can be followed for any other such conflicting framework errors.

brainforked
  • 139
  • 1
  • 16