Matt Galloway

My home on the 'net.

UIImagePickerController returning nil image

I am having a strange issue with UIImagePickerController which is really bugging me. I’ve also found someone else with the same problem so I know it’s not just me!

When using UIImagePickerController, and the imagePickerController:didFinishPickingImage:editingInfo: delegate method gets called, I find that sometimes the returned image is nil, which depending on what you do with the image will cause a crash or at least not do what you expected. It seems to be a memory issue because when you reboot the iPhone and try again, it works and returns the image correctly. Also, I’ve not have the problem on iPhone 3G S which has more RAM, indicating again to a memory issue.

I’m wondering it the new imagePickerController:didFinishPickingMediaWithInfo: delegate method will work – as the other has been deprecated in 3.0 anyway.

But has anyone else had, and fixed, this problem?