I have used this code from the IOS examples. And tried to save the images from camera. The issue is that the image is getting saved but with a blue tint as below.
In a given image order of channels is reversed, ie instead from opencv default representation BGR the image has the representation RGB, namely channel red and blue are swapped.