I’m working on an iOS camera application that takes photos on a timer. It seems to work well for about a minute and then it will intermittently fail to capture photos. I pick up this error in the didFinishProcessingPhoto
portion of AVFoundation’s Photo Capture Delegate:
Error Domain=AVFoundationErrorDomain Code=-11830 "Cannot Take Photo" UserInfo={AVErrorRecordingFailureDomainKey=3, NSLocalizedDescription=Cannot Take Photo, NSLocalizedRecoverySuggestion=Try taking a photo again.}
Does anyone know where I can find a reference to this error? I can’t find Code=-11830 anywhere and there has to be something more descriptive than just "Cannot Take Photo".
2
Answers
Sometimes this kind of error occur due to phone storage related issues, please check if your phone has enough memory also try again with app relaunch or phone restart.
-11830
isAVErrorMaximumStillImageCaptureRequestsExceeded
, which is actually documented (!!!)Are you deliberately taking many photos at once? If so check out
AVCaptureVideoDataOutput
andAVCaptureMovieFileOutput
. These allow higher framerate video capture. Note that the formats are different to photo style presets.