Duplicate Symbol Collision Between ArcGIS Runtime SDK for iOS and SBJson

2701
3
Jump to solution
10-23-2013 07:56 PM
DanaMaher
Occasional Contributor
It appears that a typedef in the AGSSBJsonStreamParserState class of the SBJson variant contained within the ArcGIS Runtime SDK for iOS has not been renamed from the original library.

If I include SBJson in a project that also uses the ArcGIS Runtime SDK, I get a number of "duplicate symbol" errors for an enum with values of the format AGSSBJsonStreamParserState_< some state > . I attached a modified demo project that attempts to import SBJson. The build will fail and spit out a number of "duplicate symbol" errors. Using CocoaPods for SBJson does not auto-solve this collision.

I am using SBJson to build a streaming JSON parser that will process data used for, among other things, display on an AGSMapView. I plan on renaming any conflicting enums in my local copy of SBJson, since this seems to be the quickest way to resolve the issue and the Runtime SDK version is not fully exposed.

This is more of a bug report than a request for assistance.
0 Kudos
1 Solution

Accepted Solutions
EricIto
New Contributor III
Thank you for submitting this.

We do actually expose the method you are talking about, however:

-[AGSSBJsonParser objectWithData];

ArcGIS.h imports AGSSBJsonParser.h which has this declared

You should be able to use this as a workaround.

View solution in original post

0 Kudos
3 Replies
DanaMaher
Occasional Contributor
A co-worker asked why I am not simply using the SBJson variant in the ArcGIS Runtime SDK. In case I did not make it sufficiently clear in my first post, the variant is not exposed enough for me to use its methods, or the standard SBJson methods have been renamed/changed. For instance, AGSSBJson does not have, or the Runtime SDK does not expose, the -(id)objectWithData:(NSData *)data method .
0 Kudos
EricIto
New Contributor III
Thank you for submitting this.

We do actually expose the method you are talking about, however:

-[AGSSBJsonParser objectWithData];

ArcGIS.h imports AGSSBJsonParser.h which has this declared

You should be able to use this as a workaround.
0 Kudos
DanaMaher
Occasional Contributor
Yes, you are correct. I thought I saw the behavior described but must have been mis-typing or something. Thanks.
0 Kudos