I'm trying to decode some data which I encoded in bash using
base64 -in file.txt -out encodedFile.txt
Decoding it in bash is no problem.
But when I try to decode it in Objective-C using
//fetch encoded data from file system, put it in
//NSData *encoded
NSData *decoded = [[NSData alloc] initWithBase64EncodedData:encoded withOptions:0];
I'm always receiving nil.
EDIT
I tried encoding the same file in Objective-C and noticed there is only one small difference:
Encoded in bash:
dGhpcyBpcyBhIHRlc3Qh
Encoded in Objective-C:
VGhpcyBpcyBhIHRlc3Qh
Only the first character is different.