I have a UIImagePickerController being called with sourceType camera and 80% of the time I get a black preview. If I wait, let\'s say around 30 seconds, I get a good preview
Firstly, this issue does seem partly Apples fault and the developers, probably more on developers side. I was able to get my app to produce a black preview image by toggling between native camera app and my own app's usage of UIImagePickerController camera mode. It was not consistent but I did make it occur doing those steps repeatedly for about 5-15 times, eventually it would become black preview.
On the other hand, I was able to address this issue by refactoring my own code. I didn't need to build a custom camera like others may have done with AVFoundation, rather, I removed all potential / valid memory leaks from my code. Make sure you test your app with Instruments, get rid of any leaks. Clean up UIImagePickerController also, that may differ depending on using ARC or not. After my refactor, the problem with black preview went away. I believe a memory leak in your app is what is causing the video preview to become black after sometime.
Last but not least, I had another app which uses zxing scanner, which uses AVFoundation for decoding images from live preview stream...this one was very tricky to fix, it was ARC mixed with non-arc( zxing non-arc). I had to refactor a bunch more code as the view / UIViewController hierarchy was much more complex and getting the actual object which contains the AVFoundation Session to dealloc was the key. After a day of refactoring this problem went away, so yes, plugging memory leaks was the answer in both my cases of the black image preview problem in iOS 7.