I have been suffering from the common issues discussed at length in this post:
Snapshotting a view that has not been rendered results in an empty snapshot. Ensure your view has been rendered at least once before snapshotting or snapshot after screen updates.
I have tried the various workarounds discussed in that thread but to no avail. The issues I have now are:
- If I clean and build the app then the first time that the camera is utilised it allows me to take a photo
- Every attempt to take a photo thereafter fails:
- If I try to take another photo the camera freezes
- If I close the app and reopen it and try to take another photo, pressing the capture button does not do anything
Using custom controls (i.e. completely customizing camera capture behaviour) gives rise to a warning in the console camera is not ready.
[picker takePhoto];
I am testing on an iPhone 4 with iOS 7.1 installed, XCode 5 with version 7.1 of the SDK.
This occurs when running the app and when installed the app via an archived build.
Interestingly the most recent post on the above-mentioned thread suggests that similar problems occur with Apple's own Photobucket example (UIImagePickerController error: Snapshotting a view that has not been rendered results in an empty snapshot in iOS 7)
Any other suggestions would be welcome. A solution built using AVFoundation may be viable if the effort is warranted, i.e. if the above-mentioned issues are specifically UIImagePickerController
-related and not because my hardware is crap or I've overlooked something.