GTMBase64
GTMBase64 copied to clipboard
'autorelease' is unavailable: not available in automatic reference counting mode
I got this error message at line 288
/Users/MNurdin/Documents/iOS/*****/Library/GTMBase64/GTMBase64.m:288:73: 'autorelease' is unavailable: not available in automatic reference counting mode
Source code GTMBase64.m
+(NSString *)stringByEncodingData:(NSData *)data {
NSString *result = nil;
NSData *converted = [self baseEncode:[data bytes]
length:[data length]
charset:kBase64EncodeChars
padded:YES];
if (converted) {
result = [[[NSString alloc] initWithData:converted
encoding:NSASCIIStringEncoding] autorelease]; //error here
}
return result;
}
Please advice. Thank you.
sorry, I'm late.
This is because GTMBase64 is old project, does not use ARC,If your project is using ARC,you can check this,disable ARC for a single file in your project : http://stackoverflow.com/questions/6646052/how-can-i-disable-arc-for-a-single-file-in-a-project