TouchJSON conflicts with AdMob and Cocos2d

If you happen to use Admob and cocos2d in the same project, the compilation will fail with some linking errors. Although it is not mentioned on Admod SDK documentation, apparently Admob borrows TouchJSON from touch code, so does Cocos2d.

ld: duplicate symbol .objc_category_name_NSCharacterSet_NSCharacterSet_Extensions in /AdMob/libAdMobSimulator.a(NSCharacterSet_Extensions.o) and Debug-iphonesimulator/

The duplicated links could be resolved by removing it from one of the sources. Since we don’t have Admob source code, the workaround is actually to remove the TouchJSON directories from your project which are located in the cocos2d source code.

Directory and Files to be Removed as they are statically linked through admob +TouchJSON -CDataScanner.h -CDataScanner.m +Extensions -CDataScanner_Extensions.h -CDataScanner_Extensions.m -NSCharacterSet_Extensions.h -NSCharacterSet_Extensions.m -NSDictionary_JSONExtensions.h -NSDictionary_JSONExtensions.m -NSScanner_Extensions.h -NSScanner_Extensions.m +JSON -CJSONDeserializer.h -CJSONDeserializer.m -CJSONScanner.h -CJSONScanner.m -CJSONSerializer.h -CJSONSerializer.m