nicklockwood/Base64

EXC

Opened this issue · 8 comments

+ (NSString *)stringWithBase64EncodedString:(NSString *)string
{
    NSData *data = [NSData dataWithBase64EncodedString:string];
    if (data)
    {
        return [[self alloc] initWithData:data encoding:NSUTF8StringEncoding];
    }
    return nil;
}

screen shot 2014-02-07 at 3 36 01 pm

There is no need to use this library any more. See here for how to use the built-in Base64 apis instead (iOS 4 and up).

http://iosdevelopertips.com/best-practices/eveything-you-need-to-know-about-ios-and-os-x-deprecated-apis.html

Thanks Nicklockwood, But I am getting this issue on iOS 6.

Are you using ARC?

Hmm. I can't see any reason why that would crash. Are you able to send me a project that demonstrates the issue?

It is working in all other places like encoding image and other text but in case of decoding "bankCode":"dGVzdA==" app getting crash , while i am able to decode this string online.

Ahhhhhh, Thanks nicklockwood for your kind suport and prompt response. i resolved this issue.
It is due to build setting I enable Guard malloc and Zommbie object and Log exception in build setting. Once i remove this check it start working. Thank You

No problem, glad you found a solution :-)