have an app that can take a picture and then upload to a server. encoding it to base 64 and pass it thru a XMLRPC to my php server.
i want to take the NSDictionary info that is returned from UIImagePickerController delegate
-(void) imagePickerController:(UIImagePickerController *)imagePicker didFinishPickingMediaWithInfo:(NSDictionary *)info
and convert it to NSData so i can encode it.
so, how can i convert NSDictionary to an NSData?
Best Answer
You can use an NSKeyedArchiver to serialize your NSDictionary to an NSData object. Note that all the objects in the dictionary will have to be serializable (implement NSCoding at some point in their inheritance tree) in order for this to work.
Too lazy to go through my projects to lift code, so here is some from the Internet:
Encode
Decode: