I use JSON for implementing Facebook in an app and I'm just making my code ARC-friendly. However, when I make lines such as this one
CFStringAppendCharacters((CFMutableStringRef)json, &uc, 1);
become
CFStringAppendCharacters((__bridge CFMutableStringRef)json, &uc, 1);
my app is no longer able to pull my photo albums (I allow the user to log into Facebook and I then display his albums in order for him/her to get a picture to later use in the app).
This is the entire code that is not appreciated by ARC - (could anyone give me a hint how to bridge it please?)
NSString* escaped_value = (NSString *)CFURLCreateStringByAddingPercentEscapes(
NULL, /* allocator */
(CFStringRef)value,
NULL, /* charactersToLeaveUnescaped */
(CFStringRef)@"!*'();:@&=+$,/?%#[]",
kCFStringEncodingUTF8);
Does anyone know how I could port the JSON framework for ARC use?