Question

Well, I did add the JSONKit classes (JSONKit.h & JSONKit.h) but in the .m file, I have a lot of warnings & compil's error's like:

NSError *error;  //--> ARC forbids Objetive-C in structs or unions

or 

id key, object; whit the same error

anObject = [anObject retain]; //---> ARC forbids explicit message send 'retain''

or many error's in this part code:

static void _JKArrayInsertObjectAtIndex(JKArray *array, id newObject, NSUInteger objectIndex) {
  NSCParameterAssert((array != NULL) && (array->objects != NULL) && (array->count <= array->capacity) && (objectIndex <= array->count) && (newObject != NULL));
  if(!((array != NULL) && (array->objects != NULL) && (objectIndex <= array->count) && (newObject != NULL))) { [newObject autorelease]; return; }
  if((array->count + 1UL) >= array->capacity) {
    id *newObjects = NULL;
    if((newObjects = (id *)realloc(array->objects, sizeof(id) * (array->capacity + 16UL))) == NULL) { [NSException raise:NSMallocException format:@"Unable to resize objects array."]; }
    array->objects = newObjects;
    array->capacity += 16UL;
    memset(&array->objects[array->count], 0, sizeof(id) * (array->capacity - array->count));
  }
  array->count++;
  if((objectIndex + 1UL) < array->count) { memmove(&array->objects[objectIndex + 1UL], &array->objects[objectIndex], sizeof(id) * ((array->count - 1UL) - objectIndex)); array->objects[objectIndex] = NULL; }
  array->objects[objectIndex] = newObject;
}

how can I use in the best way the JSONKit & JSON framework for xcode 4.6 iOS 6?

& thanks a lot!!! greetings from Bolivia!! Rock ON!!! XD

Was it helpful?

Solution

Trying to use another fork of JSONKit. With a simple search, I have find some fork which have correct this problem.

Maybe this one: https://github.com/Kelp404/JSONKit/network

The last commit of original JSONKit is up to 8 month at this day... it's bad !

OTHER TIPS

For anyone interested, I just forked the original repo and added in the fixes (and a Podspec file) that looks like it works with iOS6. https://github.com/JoistApp/JSONKit

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top