4

I want to use the Facebook authentication in my iphone app. But the problem is that I am already using this json library. https://github.com/stig/json-framework

After copying FBConnect to my project, there is a linker error, saying that there is a clash around a class named SBJsonParser.

ld: duplicate symbol _OBJC_METACLASS_$_SBJsonParser in /Users/saileshmittal/Library/Developer/Xcode/.../i386/SBJsonParser-5856452AC92B115F.o for architecture i386

I don't want to change the existing code around the json library that I am using. Is there a work around for this?

I may be looking at the namespacing in importing, something like import "myProject/json.h" and import "facebook/json.h"; how do I go about changing the project structure to support this? Or if there is a better solution, please tell.

1 Answer 1

3

Facebook is using the same JSON library, so the easiest thing would probably be to remove one of the two libraries from your project. If you want to keep your own, then just remove Facebook's JSON classes instead.

3
  • 1
    Removing one din't help much. I think the JSON in facebook is outdated(?)
    – Sailesh
    Aug 26, 2011 at 11:01
  • 1
    Marking as correct since it partially solved my problem :). Though I found the solution here stackoverflow.com/questions/6130568/…
    – Sailesh
    Aug 26, 2011 at 11:03
  • As a principle I must disagree, and now that the Facebook iOS SDK is a library and no longer open code, you may find this an even bigger problem
    – Daniel
    Jul 11, 2012 at 20:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.