How to make GDATAXML compatible with ARC in XCODE 4.2?

3.2k views Asked by At

I tried to convert GDATAXML Lib to ARC automatically with the refractor -> Convert to ARC Objective-C in XCode 4.2.

The ARC converter gives the following error:

  result = [NSString stringWithUTF8String:(const char *) chars];
  if (cacheDict) {
    // save the string in the document's string cache
    CFDictionarySetValue(cacheDict, chars, result);
  }

error: Impicit conversion of Ojective-C pointer to void.

Has anyone succeeded in converting the GDATAXML Libs to ARC Objective-C?

3

There are 3 answers

0
iDroid On

You need to use bridged cast:

CFDictionarySetValue(cacheDict, chars, (__bridge_retained_void*) result);

Check out Apple's article "Transitioning to ARC", especially the part about briding.

0
James On

I found someone who has (apparently successfully) done the refactor for ARC.

see: http://www.michaelbabiy.com/arc-compliant-gdataxml-library/

1
yoninja On

please follow the instructions on how to make GDataXML work on your code: http://ibombsite.blogspot.com/2012/02/how-to-make-gdataxmlnode-work.html