Possible Duplicate:
What is the best way to solve an Objective-C namespace collision?
In my app I used the SBJSON framework (Stig Brautaset's) to interact with my json api and everything worked very well.
But now I am in a situation to use the Facebook SSO using facebook SDK. So I included the facebook sdk into my project as instructed in Facebook developer site.
But the problem is, the facebook sdk too used some SBJSON classes like SBJsonParser, SBJsonWriter, etc that are already present in SBJSON framework that I used. These classes are similar in name but different in methods and properties. So neither I can delete , nor edit any of them. (I am a beginner and i don't know how to edit them without losing anything).
So it shows many errors because of duplicate classes.
What I can do here? Please help me :)
header files (.h) of both JSonParser classes are given below. (.m files cannot be given here because they are too lengthy.)
JSonParser.h that is used in Facebook SDK given below
#import <Foundation/Foundation.h>
#import "SBJsonBase.h"
@protocol SBJsonParser
- (id)objectWithString:(NSString *)repr;
@end
@interface SBJsonParser : SBJsonBase <SBJsonParser> {
@private
const char *c;
}
@end
@interface SBJsonParser (Private)
- (id)fragmentWithString:(id)repr;
@end
JSonParser.h that is used in SBJson Framework given below
#import <Foundation/Foundation.h>
@interface SBJsonParser : NSObject {
NSString *error;
NSUInteger depth, maxDepth;
}
@property NSUInteger maxDepth;
@property(copy) NSString *error;
- (id)objectWithData:(NSData*)data;
- (id)objectWithData:(NSData*)data;
- (id)objectWithString:(NSString*)jsonText error:(NSError**)error;
@end
Thank you :)