I am using
imageData = UIImagePNGRepresentation(imgvw.image);
and while posting
[dic setObject:imagedata forKey:@"image"];
after
NSData *data = [NSJSONSerialization dataWithJSONObject:dic options:NSJSONWritingPrettyPrinted error:&theError];
now app is crashing Terminating app due to uncaught exception 'NSInvalidArgumentException
', reason: 'Invalid type in JSON write (NSConcreteMutableData)