I have converted a UIImage in to NSData and now i want to convert that NSData in to NSString so that i can send it to a server. Here is the code
UIImage *img=mainImage.image;
NSData *imgdata=UIImagePNGRepresentation(img);
NSString *imgstr=[imgdata base64Encoding];
but i think iOS6 is not supporting this base64Encoding. Please help me if there is any alternate for base64Encoding for iOS6 or any other way to convert this NSData in to NSString.