6

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?

Brad Larson
  • 170,088
  • 45
  • 397
  • 571
Al-Noor Ladhani
  • 2,413
  • 1
  • 22
  • 14

3 Answers3

7

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

Josh Lee
  • 171,072
  • 38
  • 269
  • 275
yoninja
  • 1,952
  • 2
  • 31
  • 39
  • 2
    I will save you a click - Select Build Phases tab. Expand Compile Sources. Select GDataXMLNode.m then press Enter. On the small input box that pops-out, enter -fno-objc-arc. – Ryan Heitner Dec 23 '13 at 11:09
3

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

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

James
  • 851
  • 6
  • 10
0

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.

iDroid
  • 10,403
  • 1
  • 19
  • 27