I used Selenium NativeDriver for Testing an App. My Application was using JSON Library.  And I was getting the below  error on building:

duplicate symbol _OBJC_CLASS_$_SBJSON.

I learned that The NativeDriver library was using JSON for data transfer. So It also was using the same  JSON library.

I was able to fix the problem by excluding the JSON Source files through Xcode settings.

The fix is as below:

Add a user-defined build setting with the name “EXCLUDED_SOURCE_FILE_NAMES”  in Build Settings for the Project’s Target ,  and for the value add :

JSON.h SBJSON.h SBJSON.m SBJsonBase.h SBJsonBase.m SBJsonParser.h SBJsonParser.m SBJsonWriter.h SBJsonWriter.m NSObject+SBJSON.h NSObject+SBJSON.m NSString+SBJSON.h NSString+SBJSON.m

Below images might help you in adding  User defined setting to Project.

Advertisements